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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/avatar_icon_controller_unittest.mm

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/profiles/avatar_icon_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" 10 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 11 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
12 #include "chrome/browser/prefs/pref_service_syncable.h"
13 #include "chrome/browser/search_engines/template_url_service_factory.h" 12 #include "chrome/browser/search_engines/template_url_service_factory.h"
14 #include "chrome/browser/supervised_user/supervised_user_service.h" 13 #include "chrome/browser/supervised_user/supervised_user_service.h"
15 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 14 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
16 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/browser_commands.h" 16 #include "chrome/browser/ui/browser_commands.h"
18 #include "chrome/browser/ui/browser_window.h" 17 #include "chrome/browser/ui/browser_window.h"
19 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 18 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
20 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 19 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
21 #include "chrome/browser/ui/cocoa/info_bubble_window.h" 20 #include "chrome/browser/ui/cocoa/info_bubble_window.h"
22 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" 21 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h"
23 #include "chrome/browser/ui/tabs/tab_strip_model.h" 22 #include "chrome/browser/ui/tabs/tab_strip_model.h"
24 #include "chrome/test/base/testing_profile.h" 23 #include "chrome/test/base/testing_profile.h"
25 #include "components/bookmarks/test/bookmark_test_helpers.h" 24 #include "components/bookmarks/test/bookmark_test_helpers.h"
26 #include "components/signin/core/common/profile_management_switches.h" 25 #include "components/signin/core/common/profile_management_switches.h"
26 #include "components/syncable_prefs/pref_service_syncable.h"
27 27
28 class AvatarIconControllerTest : public CocoaProfileTest { 28 class AvatarIconControllerTest : public CocoaProfileTest {
29 public: 29 public:
30 void SetUp() override { 30 void SetUp() override {
31 switches::DisableNewAvatarMenuForTesting( 31 switches::DisableNewAvatarMenuForTesting(
32 base::CommandLine::ForCurrentProcess()); 32 base::CommandLine::ForCurrentProcess());
33 CocoaProfileTest::SetUp(); 33 CocoaProfileTest::SetUp();
34 ASSERT_TRUE(browser()); 34 ASSERT_TRUE(browser());
35 35
36 controller_.reset( 36 controller_.reset(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 new Browser(Browser::CreateParams(profile, chrome::GetActiveDesktop())); 119 new Browser(Browser::CreateParams(profile, chrome::GetActiveDesktop()));
120 // Build a new controller to check if it is initialized correctly for a 120 // Build a new controller to check if it is initialized correctly for a
121 // supervised user profile. 121 // supervised user profile.
122 base::scoped_nsobject<AvatarIconController> controller( 122 base::scoped_nsobject<AvatarIconController> controller(
123 [[AvatarIconController alloc] initWithBrowser:browser]); 123 [[AvatarIconController alloc] initWithBrowser:browser]);
124 124
125 EXPECT_TRUE([controller labelButtonView]); 125 EXPECT_TRUE([controller labelButtonView]);
126 126
127 browser->window()->Close(); 127 browser->window()->Close();
128 } 128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698