| Index: chrome/browser/chromeos/login/webview_login_browsertest.cc
|
| diff --git a/chrome/browser/chromeos/login/webview_login_browsertest.cc b/chrome/browser/chromeos/login/webview_login_browsertest.cc
|
| index 520538ae22fd67889583d8c8513214cd0ed3cd7f..acd8e4b2dca414293af3d407ed95c3c380a328ed 100644
|
| --- a/chrome/browser/chromeos/login/webview_login_browsertest.cc
|
| +++ b/chrome/browser/chromeos/login/webview_login_browsertest.cc
|
| @@ -83,8 +83,26 @@ IN_PROC_BROWSER_TEST_F(WebviewLoginTest, DISABLED_BackButton) {
|
| IN_PROC_BROWSER_TEST_F(WebviewLoginTest, AllowGuest) {
|
| WaitForGaiaPageLoad();
|
| JsExpect("!$('guest-user-header-bar-item').hidden");
|
| - chromeos::CrosSettings::Get()->SetBoolean(kAccountsPrefAllowGuest, false);
|
| + CrosSettings::Get()->SetBoolean(kAccountsPrefAllowGuest, false);
|
| JsExpect("$('guest-user-header-bar-item').hidden");
|
| }
|
|
|
| +// Create new account option should be available only if the settings allow it.
|
| +IN_PROC_BROWSER_TEST_F(WebviewLoginTest, AllowNewUser) {
|
| + DisableRestrictiveProxyCheck();
|
| + WaitForGaiaPageLoad();
|
| +
|
| + std::string frame_url = "$('gaia-signin').gaiaAuthHost_.initialFrameUrl_";
|
| + // New users are allowed.
|
| + JsExpect(frame_url + ".search('flow=nosignup') == -1");
|
| +
|
| + // Disallow new users - we also need to set a whitelist due to weird logic.
|
| + CrosSettings::Get()->Set(kAccountsPrefUsers, base::ListValue());
|
| + CrosSettings::Get()->SetBoolean(kAccountsPrefAllowNewUser, false);
|
| + WaitForGaiaPageReload();
|
| +
|
| + // flow=nosignup indicates that user creation is not allowed.
|
| + JsExpect(frame_url + ".search('flow=nosignup') != -1");
|
| +}
|
| +
|
| } // namespace chromeos
|
|
|