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

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

Issue 1307093004: Remove references to IsNewAvatarMenu since the flag was removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correctly close window at end of unit test. Created 5 years, 2 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"
(...skipping 11 matching lines...) Expand all
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 }
30 30
31 void SetUp() override { 31 void SetUp() override {
32 switches::DisableNewAvatarMenuForTesting(
33 base::CommandLine::ForCurrentProcess());
34
35 CocoaTest::SetUp(); 32 CocoaTest::SetUp();
36 ASSERT_TRUE(manager_.SetUp()); 33 ASSERT_TRUE(manager_.SetUp());
37 34
38 manager_.CreateTestingProfile( 35 manager_.CreateTestingProfile(
39 "test1", scoped_ptr<syncable_prefs::PrefServiceSyncable>(), 36 "test1", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
40 base::ASCIIToUTF16("Test 1"), 1, std::string(), 37 base::ASCIIToUTF16("Test 1"), 1, std::string(),
41 TestingProfile::TestingFactories()); 38 TestingProfile::TestingFactories());
42 manager_.CreateTestingProfile( 39 manager_.CreateTestingProfile(
43 "test2", scoped_ptr<syncable_prefs::PrefServiceSyncable>(), 40 "test2", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
44 base::ASCIIToUTF16("Test 2"), 0, std::string(), 41 base::ASCIIToUTF16("Test 2"), 0, std::string(),
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 [controller() keyDown:event]; 265 [controller() keyDown:event];
269 EXPECT_EQ([[controller() items] objectAtIndex:0], GetHighlightedItem()); 266 EXPECT_EQ([[controller() items] objectAtIndex:0], GetHighlightedItem());
270 267
271 [controller() keyDown:event]; 268 [controller() keyDown:event];
272 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem()); 269 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem());
273 270
274 // There are no more items now so going up should stay at the first item. 271 // There are no more items now so going up should stay at the first item.
275 [controller() keyDown:event]; 272 [controller() keyDown:event];
276 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem()); 273 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem());
277 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698