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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_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_menu_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_pump_mac.h" 10 #include "base/message_loop/message_pump_mac.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/browser/prefs/pref_service_syncable.h"
13 #include "chrome/browser/profiles/avatar_menu.h" 12 #include "chrome/browser/profiles/avatar_menu.h"
14 #include "chrome/browser/profiles/avatar_menu_observer.h" 13 #include "chrome/browser/profiles/avatar_menu_observer.h"
15 #include "chrome/browser/profiles/profile_info_cache.h" 14 #include "chrome/browser/profiles/profile_info_cache.h"
16 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 15 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
17 #include "chrome/test/base/testing_browser_process.h" 16 #include "chrome/test/base/testing_browser_process.h"
18 #include "chrome/test/base/testing_profile_manager.h" 17 #include "chrome/test/base/testing_profile_manager.h"
19 #include "components/signin/core/common/profile_management_switches.h" 18 #include "components/signin/core/common/profile_management_switches.h"
19 #include "components/syncable_prefs/pref_service_syncable.h"
20 #include "content/public/test/test_browser_thread_bundle.h" 20 #include "content/public/test/test_browser_thread_bundle.h"
21 #include "testing/gtest_mac.h" 21 #include "testing/gtest_mac.h"
22 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" 22 #import "ui/base/cocoa/controls/hyperlink_button_cell.h"
23 #include "ui/events/test/cocoa_test_event_utils.h" 23 #include "ui/events/test/cocoa_test_event_utils.h"
24 24
25 class AvatarMenuBubbleControllerTest : public CocoaTest { 25 class AvatarMenuBubbleControllerTest : public CocoaTest {
26 public: 26 public:
27 AvatarMenuBubbleControllerTest() 27 AvatarMenuBubbleControllerTest()
28 : manager_(TestingBrowserProcess::GetGlobal()) { 28 : manager_(TestingBrowserProcess::GetGlobal()) {
29 } 29 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 [controller() keyDown:event]; 268 [controller() keyDown:event];
269 EXPECT_EQ([[controller() items] objectAtIndex:0], GetHighlightedItem()); 269 EXPECT_EQ([[controller() items] objectAtIndex:0], GetHighlightedItem());
270 270
271 [controller() keyDown:event]; 271 [controller() keyDown:event];
272 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem()); 272 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem());
273 273
274 // There are no more items now so going up should stay at the first item. 274 // There are no more items now so going up should stay at the first item.
275 [controller() keyDown:event]; 275 [controller() keyDown:event];
276 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem()); 276 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem());
277 } 277 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698