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

Unified Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm

Issue 431083003: Change new-avatar-menu to an enable-disable flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Issue with the rebase Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
index 72e8d3a80a7cef0986586e8fba20c89d7d33e7a5..aa5c21c3f4093c3f64f3cd82e86658bac6c8e725 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
@@ -75,10 +75,6 @@ class ProfileChooserControllerTest : public CocoaProfileTest {
[controller_ showWindow:nil];
}
- void EnableNewAvatarMenuOnly() {
- CommandLine::ForCurrentProcess()->AppendSwitch(switches::kNewAvatarMenu);
- }
-
void EnableFastUserSwitching() {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kFastUserSwitching);
@@ -97,7 +93,7 @@ class ProfileChooserControllerTest : public CocoaProfileTest {
};
TEST_F(ProfileChooserControllerTest, InitialLayoutWithNewMenu) {
- EnableNewAvatarMenuOnly();
+ switches::EnableNewAvatarMenuForTesting(CommandLine::ForCurrentProcess());
StartProfileChooserController();
NSArray* subviews = [[[controller() window] contentView] subviews];
@@ -159,7 +155,7 @@ TEST_F(ProfileChooserControllerTest, InitialLayoutWithNewMenu) {
}
TEST_F(ProfileChooserControllerTest, InitialLayoutWithFastUserSwitcher) {
- EnableNewAvatarMenuOnly();
+ switches::EnableNewAvatarMenuForTesting(CommandLine::ForCurrentProcess());
EnableFastUserSwitching();
StartProfileChooserController();
@@ -218,7 +214,7 @@ TEST_F(ProfileChooserControllerTest, InitialLayoutWithFastUserSwitcher) {
}
TEST_F(ProfileChooserControllerTest, OtherProfilesSortedAlphabetically) {
- EnableNewAvatarMenuOnly();
+ switches::EnableNewAvatarMenuForTesting(CommandLine::ForCurrentProcess());
EnableFastUserSwitching();
// Add two extra profiles, to make sure sorting is alphabetical and not
@@ -259,7 +255,7 @@ TEST_F(ProfileChooserControllerTest, OtherProfilesSortedAlphabetically) {
TEST_F(ProfileChooserControllerTest,
LocalProfileActiveCardLinksWithNewMenu) {
- EnableNewAvatarMenuOnly();
+ switches::EnableNewAvatarMenuForTesting(CommandLine::ForCurrentProcess());
StartProfileChooserController();
NSArray* subviews = [[[controller() window] contentView] subviews];
ASSERT_EQ(1U, [subviews count]);
@@ -305,7 +301,7 @@ TEST_F(ProfileChooserControllerTest,
TEST_F(ProfileChooserControllerTest,
SignedInProfileActiveCardLinksWithNewMenu) {
- EnableNewAvatarMenuOnly();
+ switches::EnableNewAvatarMenuForTesting(CommandLine::ForCurrentProcess());
// Sign in the first profile.
ProfileInfoCache* cache = testing_profile_manager()->profile_info_cache();
cache->SetUserNameOfProfileAtIndex(0, base::ASCIIToUTF16(kEmail));

Powered by Google App Engine
This is Rietveld 408576698