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

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

Issue 323133005: Enable consistent identity on android platform by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/profile_chooser_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_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/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 controller_.reset([[ProfileChooserController alloc] 69 controller_.reset([[ProfileChooserController alloc]
70 initWithBrowser:browser() 70 initWithBrowser:browser()
71 anchoredAt:point 71 anchoredAt:point
72 withMode:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER 72 withMode:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER
73 withServiceType:signin::GAIA_SERVICE_TYPE_NONE]); 73 withServiceType:signin::GAIA_SERVICE_TYPE_NONE]);
74 [controller_ showWindow:nil]; 74 [controller_ showWindow:nil];
75 } 75 }
76 76
77 void EnableNewProfileManagement() { 77 void EnableNewProfileManagement() {
78 CommandLine::ForCurrentProcess()->AppendSwitch( 78 CommandLine::ForCurrentProcess()->AppendSwitch(
79 switches::kNewProfileManagement); 79 switches::kEnableNewProfileManagement);
80 } 80 }
81 81
82 void EnableNewAvatarMenuOnly() { 82 void EnableNewAvatarMenuOnly() {
83 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kNewAvatarMenu); 83 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kNewAvatarMenu);
84 } 84 }
85 85
86 void EnableFastUserSwitching() { 86 void EnableFastUserSwitching() {
87 CommandLine::ForCurrentProcess()->AppendSwitch( 87 CommandLine::ForCurrentProcess()->AppendSwitch(
88 switches::kFastUserSwitching); 88 switches::kFastUserSwitching);
89 } 89 }
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 EXPECT_EQ(menu()->GetItemAt(0).name, base::SysNSStringToUTF16( 454 EXPECT_EQ(menu()->GetItemAt(0).name, base::SysNSStringToUTF16(
455 [static_cast<NSButton*>(activeProfileName) title])); 455 [static_cast<NSButton*>(activeProfileName) title]));
456 456
457 // Profile links. This is a local profile, so there should be a signin button. 457 // Profile links. This is a local profile, so there should be a signin button.
458 NSArray* linksSubviews = [[activeCardSubviews objectAtIndex:0] subviews]; 458 NSArray* linksSubviews = [[activeCardSubviews objectAtIndex:0] subviews];
459 EXPECT_EQ(1U, [linksSubviews count]); 459 EXPECT_EQ(1U, [linksSubviews count]);
460 NSButton* link = static_cast<NSButton*>([linksSubviews objectAtIndex:0]); 460 NSButton* link = static_cast<NSButton*>([linksSubviews objectAtIndex:0]);
461 EXPECT_EQ(@selector(hideAccountManagement:), [link action]); 461 EXPECT_EQ(@selector(hideAccountManagement:), [link action]);
462 EXPECT_EQ(controller(), [link target]); 462 EXPECT_EQ(controller(), [link target]);
463 } 463 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698