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

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

Issue 340723002: Revert 277793 "Enable consistent identity on android platform by..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2056/src/
Patch Set: Created 6 years, 6 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 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_button_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/avatar_button_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/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/profiles/profiles_state.h" 10 #include "chrome/browser/profiles/profiles_state.h"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_window.h" 13 #include "chrome/browser/ui/browser_window.h"
14 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 14 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
15 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 15 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
16 #include "chrome/browser/ui/cocoa/info_bubble_window.h" 16 #include "chrome/browser/ui/cocoa/info_bubble_window.h"
17 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" 17 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "components/signin/core/common/profile_management_switches.h"
20 19
21 const char kDefaultProfileName[] = "default"; 20 const char kDefaultProfileName[] = "default";
22 21
23 class AvatarButtonControllerTest : public CocoaProfileTest { 22 class AvatarButtonControllerTest : public CocoaProfileTest {
24 public: 23 public:
25 virtual void SetUp() OVERRIDE { 24 virtual void SetUp() OVERRIDE {
26 switches::EnableNewProfileManagementForTesting( 25 CommandLine::ForCurrentProcess()->AppendSwitch(
27 CommandLine::ForCurrentProcess()); 26 switches::kNewProfileManagement);
28 DCHECK(profiles::IsMultipleProfilesEnabled()); 27 DCHECK(profiles::IsMultipleProfilesEnabled());
29 28
30 CocoaProfileTest::SetUp(); 29 CocoaProfileTest::SetUp();
31 ASSERT_TRUE(browser()); 30 ASSERT_TRUE(browser());
32 31
33 controller_.reset( 32 controller_.reset(
34 [[AvatarButtonController alloc] initWithBrowser:browser()]); 33 [[AvatarButtonController alloc] initWithBrowser:browser()]);
35 } 34 }
36 35
37 virtual void TearDown() OVERRIDE { 36 virtual void TearDown() OVERRIDE {
(...skipping 27 matching lines...) Expand all
65 64
66 [button() performClick:button()]; 65 [button() performClick:button()];
67 EXPECT_EQ(menu, [controller() menuController]); 66 EXPECT_EQ(menu, [controller() menuController]);
68 67
69 // Do not animate out because that is hard to test around. 68 // Do not animate out because that is hard to test around.
70 static_cast<InfoBubbleWindow*>(menu.window).allowedAnimations = 69 static_cast<InfoBubbleWindow*>(menu.window).allowedAnimations =
71 info_bubble::kAnimateNone; 70 info_bubble::kAnimateNone;
72 [menu close]; 71 [menu close];
73 EXPECT_FALSE([controller() menuController]); 72 EXPECT_FALSE([controller() menuController]);
74 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698