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

Unified Diff: chrome/browser/ui/browser_command_controller_unittest.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_command_controller_unittest.cc
diff --git a/chrome/browser/ui/browser_command_controller_unittest.cc b/chrome/browser/ui/browser_command_controller_unittest.cc
index 60ac52170faef588d77cea6cf7f31cb2e22a6d7e..2ea9e44b3fe4fc1987364d3e6abb366e76870163 100644
--- a/chrome/browser/ui/browser_command_controller_unittest.cc
+++ b/chrome/browser/ui/browser_command_controller_unittest.cc
@@ -27,6 +27,16 @@
typedef BrowserWithTestWindowTest BrowserCommandControllerTest;
+static void EnableNewProfileManagement() {
+#if defined(OS_ANDROID)
+ DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableNewProfileManagement));
+#else
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableNewProfileManagement);
+#endif
+}
+
TEST_F(BrowserCommandControllerTest, IsReservedCommandOrKey) {
#if defined(OS_CHROMEOS)
// F1-3 keys are reserved Chrome accelerators on Chrome OS.
@@ -211,8 +221,7 @@ TEST_F(BrowserCommandControllerTest, NewAvatarMenuEnabledWhenOnlyOneProfile) {
return;
// The command line is reset at the end of every test by the test suite.
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kNewProfileManagement);
+ EnableNewProfileManagement();
EXPECT_TRUE(switches::IsNewProfileManagement());
TestingProfileManager testing_profile_manager(
@@ -239,8 +248,7 @@ TEST_F(BrowserCommandControllerTest, NewAvatarMenuEnabledInGuestMode) {
return;
// The command line is reset at the end of every test by the test suite.
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kNewProfileManagement);
+ EnableNewProfileManagement();
EXPECT_TRUE(switches::IsNewProfileManagement());
TestingProfileManager testing_profile_manager(
@@ -294,8 +302,7 @@ TEST_F(BrowserCommandControllerTest, AvatarMenuAlwaysDisabledInIncognitoMode) {
// The new style avatar menu should also be disabled.
// The command line is reset at the end of every test by the test suite.
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kNewProfileManagement);
+ EnableNewProfileManagement();
EXPECT_TRUE(switches::IsNewProfileManagement());
EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_SHOW_AVATAR_MENU));
}

Powered by Google App Engine
This is Rietveld 408576698