diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 19:33:30 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 19:33:30 +0000 |
commit | 58473dc6bb5f834f54e30c3a4f5985ad0f467304 (patch) | |
tree | 9fc8b28461840060ec9a2a555d161c8927807c38 | |
parent | 4cd97edd0b3362c5e16a17ed9988279b2273b9ef (diff) | |
download | chromium_src-58473dc6bb5f834f54e30c3a4f5985ad0f467304.zip chromium_src-58473dc6bb5f834f54e30c3a4f5985ad0f467304.tar.gz chromium_src-58473dc6bb5f834f54e30c3a4f5985ad0f467304.tar.bz2 |
Revert of Show error message if authenticated user e-mail retrieval fails (https://codereview.chromium.org/206573003/)
Reason for revert:
SamlTest.FailToRetrieveAutenticatedUserEmailAddress crashed
http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%282%29/builds/10548/steps/browser_tests/logs/FailToRetrieveAutenticatedUserEmailAddress
Original issue's description:
> Show error message if authenticated user e-mail retrieval fails
>
> With this CL, an error message is shown when the authenticated user's
> e-mail address cannot be retrieved during enrollment or login.
>
> TEST=New browser test
> BUG=335542
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=258565
TBR=nkostylev@chromium.org,bartfab@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=335542
Review URL: https://codereview.chromium.org/196563004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258646 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed, 14 insertions, 47 deletions
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index 91311a7..cb98751 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp @@ -1341,7 +1341,7 @@ Press any key to continue exploring. <message name="IDS_LOGIN_PREVIOUS_PASSWORD" desc="Password field text on the password changed dialog"> Previous password </message> - <message name="IDS_LOGIN_SAML_NOTICE" desc="Text message displayed above SAML portal to early indicate that the user is being redirected to another sign-in provider."> + <message name="IDS_LOGIN_SAML_NOTICE" desc="Text message displayed above SAML portal to learly indicate that the user is being redirected to another sign-in provider."> The sign-in service below is hosted by <ph name="SAML_DOMAIN">$1<ex>saml.com</ex></ph>. Sign in to continue. </message> <message name="IDS_LOGIN_CONFIRM_PASSWORD_TITLE" desc="Title for the confirm password dialog."> diff --git a/chrome/browser/chromeos/login/saml/saml_browsertest.cc b/chrome/browser/chromeos/login/saml/saml_browsertest.cc index 2115001..3287ad5 100644 --- a/chrome/browser/chromeos/login/saml/saml_browsertest.cc +++ b/chrome/browser/chromeos/login/saml/saml_browsertest.cc @@ -245,7 +245,17 @@ class SamlTest : public InProcessBrowserTest { } virtual void SetUpOnMainThread() OVERRIDE { - SetMergeSessionParams(kFirstSAMLUserEmail); + FakeGaia::MergeSessionParams params; + params.auth_sid_cookie = kTestAuthSIDCookie; + params.auth_lsid_cookie = kTestAuthLSIDCookie; + params.auth_code = kTestAuthCode; + params.refresh_token = kTestRefreshToken; + params.access_token = kTestAuthLoginAccessToken; + params.gaia_uber_token = kTestGaiaUberToken; + params.session_sid_cookie = kTestSessionSIDCookie; + params.session_lsid_cookie = kTestSessionLSIDCookie; + params.email = kFirstSAMLUserEmail; + fake_gaia_.SetMergeSessionParams(params); embedded_test_server()->RegisterRequestHandler( base::Bind(&FakeGaia::HandleRequest, base::Unretained(&fake_gaia_))); @@ -269,20 +279,6 @@ class SamlTest : public InProcessBrowserTest { } } - void SetMergeSessionParams(const std::string& email) { - FakeGaia::MergeSessionParams params; - params.auth_sid_cookie = kTestAuthSIDCookie; - params.auth_lsid_cookie = kTestAuthLSIDCookie; - params.auth_code = kTestAuthCode; - params.refresh_token = kTestRefreshToken; - params.access_token = kTestAuthLoginAccessToken; - params.gaia_uber_token = kTestGaiaUberToken; - params.session_sid_cookie = kTestSessionSIDCookie; - params.session_lsid_cookie = kTestSessionLSIDCookie; - params.email = email; - fake_gaia_.SetMergeSessionParams(params); - } - WebUILoginDisplay* GetLoginDisplay() { ExistingUserController* controller = ExistingUserController::current_controller(); @@ -508,24 +504,6 @@ IN_PROC_BROWSER_TEST_F(SamlTest, UseAutenticatedUserEmailAddress) { EXPECT_EQ(kFirstSAMLUserEmail, user->email()); } -// Verifies that if the authenticated user's e-mail address cannot be retrieved, -// an error message is shown. -IN_PROC_BROWSER_TEST_F(SamlTest, FailToRetrieveAutenticatedUserEmailAddress) { - fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); - StartSamlAndWaitForIdpPageLoad(kFirstSAMLUserEmail); - - SetSignFormField("Email", "fake_user"); - SetSignFormField("Password", "fake_password"); - ExecuteJsInSigninFrame("document.getElementById('Submit').click();"); - - OobeScreenWaiter(OobeDisplay::SCREEN_CONFIRM_PASSWORD).Wait(); - - SetMergeSessionParams(""); - SendConfirmPassword("fake_password"); - - OobeScreenWaiter(OobeDisplay::SCREEN_FATAL_ERROR).Wait(); -} - // Tests the password confirm flow: show error on the first failure and // fatal error on the second failure. IN_PROC_BROWSER_TEST_F(SamlTest, PasswordConfirmFlow) { diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js b/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js index 7ed334c..01e82ca 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js @@ -249,12 +249,7 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { * @param {string} email The authenticated user's e-mail address. */ setAuthenticatedUserEmail: function(attemptToken, email) { - if (this.attemptToken_ != attemptToken) - return; - - if (!email) - this.showError(loadTimeData.getString('fatalEnrollmentError'), false); - else + if (this.attemptToken_ == attemptToken) chrome.send('oauthEnrollCompleteLogin', [email]); }, diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js index aa88b57..8656552 100644 --- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js +++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js @@ -325,10 +325,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { * @param {string} email The authenticated user's e-mail address. */ setAuthenticatedUserEmail: function(attemptToken, email) { - if (!email) - this.showFatalAuthError(); - else - this.gaiaAuthHost_.setAuthenticatedUserEmail(attemptToken, email); + this.gaiaAuthHost_.setAuthenticatedUserEmail(attemptToken, email); }, /** diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc index f28d783..b572b94 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc @@ -434,9 +434,6 @@ void SigninScreenHandler::DeclareLocalizedValues( builder->Add("easyUnlockTooltip", IDS_LOGIN_EASY_UNLOCK_TOOLTIP); - builder->Add("fatalEnrollmentError", - IDS_ENTERPRISE_ENROLLMENT_AUTH_FATAL_ERROR); - if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) builder->Add("demoLoginMessage", IDS_KIOSK_MODE_LOGIN_MESSAGE); |