Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1398)

Side by Side Diff: chrome/browser/ui/cocoa/browser/avatar_button_controller_unittest.mm

Issue 24120005: Cleanup and IWYU-ify CocoaProfileTest and related tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include order Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h" 5 #import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "chrome/browser/managed_mode/managed_user_service.h" 8 #include "chrome/browser/managed_mode/managed_user_service.h"
9 #include "chrome/browser/managed_mode/managed_user_service_factory.h" 9 #include "chrome/browser/managed_mode/managed_user_service_factory.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
12 #import "chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h" 12 #import "chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h"
13 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 13 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
14 #include "chrome/browser/ui/cocoa/info_bubble_window.h" 14 #include "chrome/browser/ui/cocoa/info_bubble_window.h"
15 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "chrome/test/base/testing_profile.h"
16 17
17 class AvatarButtonControllerTest : public CocoaProfileTest { 18 class AvatarButtonControllerTest : public CocoaProfileTest {
18 public: 19 public:
19 virtual void SetUp() { 20 virtual void SetUp() {
20 CocoaProfileTest::SetUp(); 21 CocoaProfileTest::SetUp();
21 ASSERT_TRUE(browser()); 22 ASSERT_TRUE(browser());
22 23
23 controller_.reset( 24 controller_.reset(
24 [[AvatarButtonController alloc] initWithBrowser:browser()]); 25 [[AvatarButtonController alloc] initWithBrowser:browser()]);
25 [[controller_ view] setHidden:YES]; 26 [[controller_ view] setHidden:YES];
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Transform the first profile to a managed user profile. 90 // Transform the first profile to a managed user profile.
90 ManagedUserServiceFactory::GetForProfile(profile())->InitForTesting(); 91 ManagedUserServiceFactory::GetForProfile(profile())->InitForTesting();
91 92
92 // Build a new controller to check if it is initialized correctly for a 93 // Build a new controller to check if it is initialized correctly for a
93 // managed user profile. 94 // managed user profile.
94 base::scoped_nsobject<AvatarButtonController> controller( 95 base::scoped_nsobject<AvatarButtonController> controller(
95 [[AvatarButtonController alloc] initWithBrowser:browser()]); 96 [[AvatarButtonController alloc] initWithBrowser:browser()]);
96 97
97 EXPECT_TRUE([controller labelButtonView]); 98 EXPECT_TRUE([controller labelButtonView]);
98 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698