Commit dbeedd44 authored by Jacob Dufault's avatar Jacob Dufault Committed by Commit Bot

cros: Make views-login the default for OobeBaseTest and LoginManagerTest

TBR=antrim@chromium.org

Bug: 912704
Change-Id: I998eb80102e9887872bd528098e93364836cf1e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1407080
Commit-Queue: Jacob Dufault <jdufault@chromium.org>
Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#656456}
parent e5b6ed3a
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <string> #include <string>
#include "ash/public/cpp/ash_switches.h"
#include "base/base_paths.h" #include "base/base_paths.h"
#include "base/environment.h" #include "base/environment.h"
#include "base/path_service.h" #include "base/path_service.h"
...@@ -232,8 +233,23 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, PasswordChange_UIErrors) { ...@@ -232,8 +233,23 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, PasswordChange_UIErrors) {
ad_login_.TestPasswordChangeOldPasswordError(); ad_login_.TestPasswordChangeOldPasswordError();
} }
class ActiveDirectoryWebUILoginTest : public ActiveDirectoryLoginTest {
public:
ActiveDirectoryWebUILoginTest() = default;
~ActiveDirectoryWebUILoginTest() override = default;
// chromeos::ActiveDirectoryLoginTest:
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(ash::switches::kShowWebUiLogin);
chromeos::ActiveDirectoryLoginTest::SetUpCommandLine(command_line);
}
private:
DISALLOW_COPY_AND_ASSIGN(ActiveDirectoryWebUILoginTest);
};
// Test reopening Active Directory password change screen clears errors. // Test reopening Active Directory password change screen clears errors.
IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, IN_PROC_BROWSER_TEST_F(ActiveDirectoryWebUILoginTest,
PasswordChange_ReopenClearErrors) { PasswordChange_ReopenClearErrors) {
OobeBaseTest::WaitForSigninScreen(); OobeBaseTest::WaitForSigninScreen();
ASSERT_TRUE(InstallAttributes::Get()->IsActiveDirectoryManaged()); ASSERT_TRUE(InstallAttributes::Get()->IsActiveDirectoryManaged());
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <vector> #include <vector>
#include "apps/test/app_window_waiter.h" #include "apps/test/app_window_waiter.h"
#include "ash/public/cpp/ash_switches.h"
#include "ash/public/interfaces/login_screen_test_api.test-mojom-test-utils.h" #include "ash/public/interfaces/login_screen_test_api.test-mojom-test-utils.h"
#include "ash/public/interfaces/wallpaper.mojom.h" #include "ash/public/interfaces/wallpaper.mojom.h"
#include "base/bind.h" #include "base/bind.h"
...@@ -1393,6 +1394,11 @@ class KioskUpdateTest : public KioskTest { ...@@ -1393,6 +1394,11 @@ class KioskUpdateTest : public KioskTest {
KioskTest::SetUp(); KioskTest::SetUp();
} }
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(ash::switches::kShowWebUiLogin);
KioskTest::SetUpCommandLine(command_line);
}
void TearDown() override { void TearDown() override {
disks::DiskMountManager::Shutdown(); disks::DiskMountManager::Shutdown();
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <utility> #include <utility>
#include "ash/public/cpp/ash_features.h" #include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/ash_switches.h"
#include "base/base64.h" #include "base/base64.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
...@@ -970,6 +971,21 @@ class SAMLPolicyTest : public SamlTest { ...@@ -970,6 +971,21 @@ class SAMLPolicyTest : public SamlTest {
DISALLOW_COPY_AND_ASSIGN(SAMLPolicyTest); DISALLOW_COPY_AND_ASSIGN(SAMLPolicyTest);
}; };
class SAMLPolicyTestWebUILogin : public SAMLPolicyTest {
public:
SAMLPolicyTestWebUILogin() = default;
~SAMLPolicyTestWebUILogin() override = default;
// SAMLPolicyTest:
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(ash::switches::kShowWebUiLogin);
SAMLPolicyTest::SetUpCommandLine(command_line);
}
private:
DISALLOW_COPY_AND_ASSIGN(SAMLPolicyTestWebUILogin);
};
SAMLPolicyTest::SAMLPolicyTest() SAMLPolicyTest::SAMLPolicyTest()
: device_policy_(test_helper_.device_policy()) {} : device_policy_(test_helper_.device_policy()) {}
...@@ -1210,7 +1226,7 @@ void SAMLPolicyTest::GetCookies() { ...@@ -1210,7 +1226,7 @@ void SAMLPolicyTest::GetCookies() {
run_loop.Run(); run_loop.Run();
} }
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_NoSAML) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin, PRE_NoSAML) {
// Set the offline login time limit for SAML users to zero. // Set the offline login time limit for SAML users to zero.
SetSAMLOfflineSigninTimeLimitPolicy(0); SetSAMLOfflineSigninTimeLimitPolicy(0);
...@@ -1235,7 +1251,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_NoSAML) { ...@@ -1235,7 +1251,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_NoSAML) {
// Verifies that the offline login time limit does not affect a user who // Verifies that the offline login time limit does not affect a user who
// authenticated without SAML. // authenticated without SAML.
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, NoSAML) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin, NoSAML) {
login_screen_load_observer_->Wait(); login_screen_load_observer_->Wait();
// Verify that offline login is allowed. // Verify that offline login is allowed.
test::OobeJS().ExpectTrue( test::OobeJS().ExpectTrue(
...@@ -1243,7 +1259,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, NoSAML) { ...@@ -1243,7 +1259,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, NoSAML) {
" '#pod-row .reauth-hint-container')).display == 'none'"); " '#pod-row .reauth-hint-container')).display == 'none'");
} }
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_SAMLNoLimit) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin, PRE_SAMLNoLimit) {
// Remove the offline login time limit for SAML users. // Remove the offline login time limit for SAML users.
SetSAMLOfflineSigninTimeLimitPolicy(-1); SetSAMLOfflineSigninTimeLimitPolicy(-1);
...@@ -1252,7 +1268,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_SAMLNoLimit) { ...@@ -1252,7 +1268,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_SAMLNoLimit) {
// Verifies that when no offline login time limit is set, a user who // Verifies that when no offline login time limit is set, a user who
// authenticated with SAML is allowed to log in offline. // authenticated with SAML is allowed to log in offline.
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLNoLimit) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin, SAMLNoLimit) {
login_screen_load_observer_->Wait(); login_screen_load_observer_->Wait();
// Verify that offline login is allowed. // Verify that offline login is allowed.
test::OobeJS().ExpectTrue( test::OobeJS().ExpectTrue(
...@@ -1260,7 +1276,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLNoLimit) { ...@@ -1260,7 +1276,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLNoLimit) {
" '#pod-row .reauth-hint-container')).display == 'none'"); " '#pod-row .reauth-hint-container')).display == 'none'");
} }
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_SAMLZeroLimit) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin, PRE_SAMLZeroLimit) {
// Set the offline login time limit for SAML users to zero. // Set the offline login time limit for SAML users to zero.
SetSAMLOfflineSigninTimeLimitPolicy(0); SetSAMLOfflineSigninTimeLimitPolicy(0);
...@@ -1269,7 +1285,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_SAMLZeroLimit) { ...@@ -1269,7 +1285,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_SAMLZeroLimit) {
// Verifies that when the offline login time limit is exceeded for a user who // Verifies that when the offline login time limit is exceeded for a user who
// authenticated via SAML, that user is forced to log in online the next time. // authenticated via SAML, that user is forced to log in online the next time.
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLZeroLimit) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin, SAMLZeroLimit) {
login_screen_load_observer_->Wait(); login_screen_load_observer_->Wait();
// Verify that offline login is not allowed. // Verify that offline login is not allowed.
test::OobeJS().ExpectTrue( test::OobeJS().ExpectTrue(
...@@ -1277,7 +1293,8 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLZeroLimit) { ...@@ -1277,7 +1293,8 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLZeroLimit) {
" '#pod-row .reauth-hint-container')).display != 'none'"); " '#pod-row .reauth-hint-container')).display != 'none'");
} }
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_PRE_TransferCookiesAffiliated) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin,
PRE_PRE_TransferCookiesAffiliated) {
fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue1); fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue1);
LogInWithSAML(kFirstSAMLUserEmail, kTestAuthSIDCookie1, kTestAuthLSIDCookie1); LogInWithSAML(kFirstSAMLUserEmail, kTestAuthSIDCookie1, kTestAuthLSIDCookie1);
...@@ -1291,7 +1308,8 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_PRE_TransferCookiesAffiliated) { ...@@ -1291,7 +1308,8 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_PRE_TransferCookiesAffiliated) {
// IdP cookies are not transferred to a user's profile on subsequent login, even // IdP cookies are not transferred to a user's profile on subsequent login, even
// if the user belongs to the domain that the device is enrolled into. Also // if the user belongs to the domain that the device is enrolled into. Also
// verifies that GAIA cookies are not transferred. // verifies that GAIA cookies are not transferred.
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_TransferCookiesAffiliated) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin,
PRE_TransferCookiesAffiliated) {
fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2); fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2);
fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html");
ShowGAIALoginForm(); ShowGAIALoginForm();
...@@ -1307,7 +1325,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_TransferCookiesAffiliated) { ...@@ -1307,7 +1325,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_TransferCookiesAffiliated) {
// cookies are transferred to a user's profile on subsequent login when the user // cookies are transferred to a user's profile on subsequent login when the user
// belongs to the domain that the device is enrolled into. Also verifies that // belongs to the domain that the device is enrolled into. Also verifies that
// GAIA cookies are not transferred. // GAIA cookies are not transferred.
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, TransferCookiesAffiliated) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin, TransferCookiesAffiliated) {
fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2); fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2);
fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html");
ShowGAIALoginForm(); ShowGAIALoginForm();
...@@ -1321,7 +1339,8 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, TransferCookiesAffiliated) { ...@@ -1321,7 +1339,8 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, TransferCookiesAffiliated) {
EXPECT_EQ(kSAMLIdPCookieValue2, GetCookieValue(kSAMLIdPCookieName)); EXPECT_EQ(kSAMLIdPCookieValue2, GetCookieValue(kSAMLIdPCookieName));
} }
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_TransferCookiesUnaffiliated) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin,
PRE_TransferCookiesUnaffiliated) {
fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue1); fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue1);
LogInWithSAML(kDifferentDomainSAMLUserEmail, kTestAuthSIDCookie1, LogInWithSAML(kDifferentDomainSAMLUserEmail, kTestAuthSIDCookie1,
kTestAuthLSIDCookie1); kTestAuthLSIDCookie1);
...@@ -1336,7 +1355,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_TransferCookiesUnaffiliated) { ...@@ -1336,7 +1355,7 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_TransferCookiesUnaffiliated) {
// IdP are not transferred to a user's profile on subsequent login if the user // IdP are not transferred to a user's profile on subsequent login if the user
// does not belong to the domain that the device is enrolled into. Also verifies // does not belong to the domain that the device is enrolled into. Also verifies
// that GAIA cookies are not transferred. // that GAIA cookies are not transferred.
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, TransferCookiesUnaffiliated) { IN_PROC_BROWSER_TEST_F(SAMLPolicyTestWebUILogin, TransferCookiesUnaffiliated) {
fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2); fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2);
fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html");
ShowGAIALoginForm(); ShowGAIALoginForm();
...@@ -1398,32 +1417,10 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLInterstitialNext) { ...@@ -1398,32 +1417,10 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLInterstitialNext) {
session_start_waiter.Wait(); session_start_waiter.Wait();
} }
// A specialization of SAMLPolicyTest which doesn't pass the command-line switch
// forcing the WebUI login, thus allowing views-based login.
class SAMLPolicyViewsBasedLoginTest : public SAMLPolicyTest {
public:
SAMLPolicyViewsBasedLoginTest() : SAMLPolicyTest() {
device_state_.SetState(
chromeos::DeviceStateMixin::State::OOBE_COMPLETED_CONSUMER_OWNED);
}
~SAMLPolicyViewsBasedLoginTest() override = default;
protected:
// OobeBaseTest:
bool ShouldForceWebUiLogin() override {
// Allow the Views-based login to be used.
return false;
}
private:
DISALLOW_COPY_AND_ASSIGN(SAMLPolicyViewsBasedLoginTest);
};
// Ensure that the permission status of getUserMedia requests from SAML login // Ensure that the permission status of getUserMedia requests from SAML login
// pages is controlled by the kLoginVideoCaptureAllowedUrls pref rather than the // pages is controlled by the kLoginVideoCaptureAllowedUrls pref rather than the
// underlying user content setting. // underlying user content setting.
IN_PROC_BROWSER_TEST_F(SAMLPolicyViewsBasedLoginTest, IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, TestLoginMediaPermission) {
TestLoginMediaPermission) {
EXPECT_TRUE(ash::features::IsViewsLoginEnabled()); EXPECT_TRUE(ash::features::IsViewsLoginEnabled());
fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html");
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ash/public/cpp/ash_switches.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/json/json_reader.h" #include "base/json/json_reader.h"
...@@ -51,6 +52,7 @@ class DeviceIDTest : public OobeBaseTest, ...@@ -51,6 +52,7 @@ class DeviceIDTest : public OobeBaseTest,
void SetUpCommandLine(base::CommandLine* command_line) override { void SetUpCommandLine(base::CommandLine* command_line) override {
OobeBaseTest::SetUpCommandLine(command_line); OobeBaseTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kOobeSkipPostLogin); command_line->AppendSwitch(switches::kOobeSkipPostLogin);
command_line->AppendSwitch(ash::switches::kShowWebUiLogin);
} }
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "ash/public/cpp/ash_switches.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
...@@ -243,6 +244,7 @@ class OAuth2Test : public OobeBaseTest { ...@@ -243,6 +244,7 @@ class OAuth2Test : public OobeBaseTest {
// OobeBaseTest overrides. // OobeBaseTest overrides.
void SetUpCommandLine(base::CommandLine* command_line) override { void SetUpCommandLine(base::CommandLine* command_line) override {
OobeBaseTest::SetUpCommandLine(command_line); OobeBaseTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(ash::switches::kShowWebUiLogin);
base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_);
......
...@@ -53,8 +53,6 @@ void OobeBaseTest::SetUp() { ...@@ -53,8 +53,6 @@ void OobeBaseTest::SetUp() {
} }
void OobeBaseTest::SetUpCommandLine(base::CommandLine* command_line) { void OobeBaseTest::SetUpCommandLine(base::CommandLine* command_line) {
if (ShouldForceWebUiLogin())
command_line->AppendSwitch(ash::switches::kShowWebUiLogin);
command_line->AppendSwitch(chromeos::switches::kLoginManager); command_line->AppendSwitch(chromeos::switches::kLoginManager);
command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
if (!needs_background_networking_) if (!needs_background_networking_)
...@@ -83,10 +81,6 @@ void OobeBaseTest::SetUpOnMainThread() { ...@@ -83,10 +81,6 @@ void OobeBaseTest::SetUpOnMainThread() {
MixinBasedInProcessBrowserTest::SetUpOnMainThread(); MixinBasedInProcessBrowserTest::SetUpOnMainThread();
} }
bool OobeBaseTest::ShouldForceWebUiLogin() {
return true;
}
bool OobeBaseTest::ShouldWaitForOobeUI() { bool OobeBaseTest::ShouldWaitForOobeUI() {
return true; return true;
} }
......
...@@ -35,12 +35,6 @@ class OobeBaseTest : public MixinBasedInProcessBrowserTest { ...@@ -35,12 +35,6 @@ class OobeBaseTest : public MixinBasedInProcessBrowserTest {
void SetUpCommandLine(base::CommandLine* command_line) override; void SetUpCommandLine(base::CommandLine* command_line) override;
void SetUpOnMainThread() override; void SetUpOnMainThread() override;
// If this returns true (default), the |ash::switches::kShowWebUiLogin|
// command-line switch is passed to force the Web Ui Login.
// If this returns false, the switch is omitted so the views-based login may
// be used.
virtual bool ShouldForceWebUiLogin();
// If this returns true (default), then SetUpOnMainThread would wait for // If this returns true (default), then SetUpOnMainThread would wait for
// Oobe UI to start up before initializing all mix-ins. // Oobe UI to start up before initializing all mix-ins.
virtual bool ShouldWaitForOobeUI(); virtual bool ShouldWaitForOobeUI();
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <string> #include <string>
#include "ash/public/cpp/ash_switches.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
...@@ -49,6 +50,11 @@ class ForceMaximizeOnFirstRunTest : public LoginPolicyTestBase { ...@@ -49,6 +50,11 @@ class ForceMaximizeOnFirstRunTest : public LoginPolicyTestBase {
return CreateBrowser(profile); return CreateBrowser(profile);
} }
void SetUpCommandLine(base::CommandLine* command_line) override {
LoginPolicyTestBase::SetUpCommandLine(command_line);
command_line->AppendSwitch(ash::switches::kShowWebUiLogin);
}
private: private:
DISALLOW_COPY_AND_ASSIGN(ForceMaximizeOnFirstRunTest); DISALLOW_COPY_AND_ASSIGN(ForceMaximizeOnFirstRunTest);
}; };
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "ash/public/cpp/ash_switches.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
...@@ -35,6 +36,7 @@ class RestoreOnStartupTestChromeOS : public LoginPolicyTestBase { ...@@ -35,6 +36,7 @@ class RestoreOnStartupTestChromeOS : public LoginPolicyTestBase {
// LoginPolicyTestBase: // LoginPolicyTestBase:
void GetMandatoryPoliciesValue(base::DictionaryValue* policy) const override; void GetMandatoryPoliciesValue(base::DictionaryValue* policy) const override;
void SetUpCommandLine(base::CommandLine* command_line) override;
void LogInAndVerifyStartUpURLs(); void LogInAndVerifyStartUpURLs();
...@@ -55,6 +57,12 @@ void RestoreOnStartupTestChromeOS::GetMandatoryPoliciesValue( ...@@ -55,6 +57,12 @@ void RestoreOnStartupTestChromeOS::GetMandatoryPoliciesValue(
policy->Set(key::kRestoreOnStartupURLs, std::move(urls)); policy->Set(key::kRestoreOnStartupURLs, std::move(urls));
} }
void RestoreOnStartupTestChromeOS::SetUpCommandLine(
base::CommandLine* command_line) {
LoginPolicyTestBase::SetUpCommandLine(command_line);
command_line->AppendSwitch(ash::switches::kShowWebUiLogin);
}
void RestoreOnStartupTestChromeOS::LogInAndVerifyStartUpURLs() { void RestoreOnStartupTestChromeOS::LogInAndVerifyStartUpURLs() {
LogIn(kAccountId, kAccountPassword, kEmptyServices); LogIn(kAccountId, kAccountPassword, kEmptyServices);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment