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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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_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 "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 14 matching lines...) Expand all
25 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
26 26
27 // Defined in the AvatarButtonController implementation. 27 // Defined in the AvatarButtonController implementation.
28 @interface AvatarButtonController (ExposedForTesting) 28 @interface AvatarButtonController (ExposedForTesting)
29 - (void)updateErrorStatus:(BOOL)hasError; 29 - (void)updateErrorStatus:(BOOL)hasError;
30 @end 30 @end
31 31
32 class AvatarButtonControllerTest : public CocoaProfileTest { 32 class AvatarButtonControllerTest : public CocoaProfileTest {
33 public: 33 public:
34 virtual void SetUp() override { 34 virtual void SetUp() override {
35 switches::EnableNewAvatarMenuForTesting(CommandLine::ForCurrentProcess()); 35 switches::EnableNewAvatarMenuForTesting(
36 base::CommandLine::ForCurrentProcess());
36 DCHECK(profiles::IsMultipleProfilesEnabled()); 37 DCHECK(profiles::IsMultipleProfilesEnabled());
37 38
38 CocoaProfileTest::SetUp(); 39 CocoaProfileTest::SetUp();
39 ASSERT_TRUE(browser()); 40 ASSERT_TRUE(browser());
40 41
41 controller_.reset( 42 controller_.reset(
42 [[AvatarButtonController alloc] initWithBrowser:browser()]); 43 [[AvatarButtonController alloc] initWithBrowser:browser()]);
43 } 44 }
44 45
45 virtual void TearDown() override { 46 virtual void TearDown() override {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 100
100 [button() performClick:button()]; 101 [button() performClick:button()];
101 EXPECT_EQ(menu, [controller() menuController]); 102 EXPECT_EQ(menu, [controller() menuController]);
102 103
103 // Do not animate out because that is hard to test around. 104 // Do not animate out because that is hard to test around.
104 static_cast<InfoBubbleWindow*>(menu.window).allowedAnimations = 105 static_cast<InfoBubbleWindow*>(menu.window).allowedAnimations =
105 info_bubble::kAnimateNone; 106 info_bubble::kAnimateNone;
106 [menu close]; 107 [menu close];
107 EXPECT_FALSE([controller() menuController]); 108 EXPECT_FALSE([controller() menuController]);
108 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698