Index: chrome/browser/chromeos/login/existing_user_controller_browsertest.cc |
diff --git a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc |
index a6cee10ee97d77809a7d9dc5d63bfb7d4b639fdd..2af22b9eef1af6d83b8e66823e551073fa53a13b 100644 |
--- a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc |
+++ b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc |
@@ -130,7 +130,8 @@ class NotificationWatcher : public content::NotificationObserver { |
} // namespace |
-class ExistingUserControllerTest : public policy::DevicePolicyCrosBrowserTest { |
+class ExistingUserControllerTest : public policy::DevicePolicyCrosBrowserTest, |
+ public testing::WithParamInterface<bool> { |
protected: |
ExistingUserControllerTest() |
: mock_network_library_(NULL), |
@@ -192,6 +193,9 @@ class ExistingUserControllerTest : public policy::DevicePolicyCrosBrowserTest { |
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
command_line->AppendSwitch(switches::kLoginManager); |
+ if (GetParam()) { |
+ command_line->AppendSwitch(::switches::kMultiProfiles); |
+ } |
} |
virtual void SetUpUserManager() { |
@@ -296,7 +300,7 @@ class ExistingUserControllerTest : public policy::DevicePolicyCrosBrowserTest { |
DISALLOW_COPY_AND_ASSIGN(ExistingUserControllerTest); |
}; |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, ExistingUserLogin) { |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerTest, ExistingUserLogin) { |
// This is disabled twice: once right after signin but before checking for |
// auto-enrollment, and again after doing an ownership status check. |
EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)) |
@@ -330,7 +334,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, ExistingUserLogin) { |
content::RunAllPendingInMessageLoop(); |
} |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, AutoEnrollAfterSignIn) { |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerTest, AutoEnrollAfterSignIn) { |
EXPECT_CALL(*mock_login_display_host_, |
StartWizardPtr(WizardController::kEnrollmentScreenName, |
_)) |
@@ -357,7 +361,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, AutoEnrollAfterSignIn) { |
content::RunAllPendingInMessageLoop(); |
} |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerTest, |
NewUserDontAutoEnrollAfterSignIn) { |
EXPECT_CALL(*mock_login_display_host_, |
StartWizardPtr(WizardController::kEnrollmentScreenName, |
@@ -585,7 +589,7 @@ class ExistingUserControllerPublicSessionTest |
DISALLOW_COPY_AND_ASSIGN(ExistingUserControllerPublicSessionTest); |
}; |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerPublicSessionTest, |
ConfigureAutoLoginUsingPolicy) { |
existing_user_controller()->OnSigninScreenReady(); |
EXPECT_EQ("", auto_login_username()); |
@@ -607,7 +611,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
EXPECT_FALSE(auto_login_timer()->IsRunning()); |
} |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerPublicSessionTest, |
AutoLoginNoDelay) { |
// Set up mocks to check login success. |
ExpectSuccessfulLogin(kAutoLoginUsername, "", |
@@ -619,7 +623,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
content::RunAllPendingInMessageLoop(); |
} |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerPublicSessionTest, |
AutoLoginShortDelay) { |
// Set up mocks to check login success. |
ExpectSuccessfulLogin(kAutoLoginUsername, "", |
@@ -643,7 +647,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
content::RunAllPendingInMessageLoop(); |
} |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerPublicSessionTest, |
LoginStopsAutoLogin) { |
// Set up mocks to check login success. |
ExpectSuccessfulLogin(kUsername, kPassword, CreateAuthenticator); |
@@ -666,7 +670,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
EXPECT_FALSE(auto_login_timer()->IsRunning()); |
} |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerPublicSessionTest, |
GuestModeLoginStopsAutoLogin) { |
EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)) |
.Times(1); |
@@ -694,7 +698,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
EXPECT_FALSE(auto_login_timer()->IsRunning()); |
} |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerPublicSessionTest, |
CompleteLoginStopsAutoLogin) { |
// Set up mocks to check login success. |
ExpectSuccessfulLogin(kUsername, kPassword, CreateAuthenticator); |
@@ -719,7 +723,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
EXPECT_FALSE(auto_login_timer()->IsRunning()); |
} |
-IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
+IN_PROC_BROWSER_TEST_P(ExistingUserControllerPublicSessionTest, |
PublicSessionLoginStopsAutoLogin) { |
// Set up mocks to check login success. |
ExpectSuccessfulLogin(kAutoLoginUsername, "", |
@@ -742,4 +746,12 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
EXPECT_FALSE(auto_login_timer()->IsRunning()); |
} |
+INSTANTIATE_TEST_CASE_P(ExistingUserControllerTestInstantiation, |
+ ExistingUserControllerTest, |
+ testing::Bool()); |
+ |
+INSTANTIATE_TEST_CASE_P(ExistingUserControllerPublicSessionTestInstantiation, |
+ ExistingUserControllerPublicSessionTest, |
+ testing::Bool()); |
+ |
} // namespace chromeos |