| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 IN_PROC_BROWSER_TEST_F(SamlTest, FailToRetrieveAutenticatedUserEmailAddress) { | 568 IN_PROC_BROWSER_TEST_F(SamlTest, FailToRetrieveAutenticatedUserEmailAddress) { |
| 569 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); | 569 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); |
| 570 StartSamlAndWaitForIdpPageLoad(kFirstSAMLUserEmail); | 570 StartSamlAndWaitForIdpPageLoad(kFirstSAMLUserEmail); |
| 571 | 571 |
| 572 fake_gaia_.SetFakeMergeSessionParams( | 572 fake_gaia_.SetFakeMergeSessionParams( |
| 573 "", kTestAuthSIDCookie1, kTestAuthLSIDCookie1); | 573 "", kTestAuthSIDCookie1, kTestAuthLSIDCookie1); |
| 574 SetSignFormField("Email", "fake_user"); | 574 SetSignFormField("Email", "fake_user"); |
| 575 SetSignFormField("Password", "fake_password"); | 575 SetSignFormField("Password", "fake_password"); |
| 576 ExecuteJsInSigninFrame("document.getElementById('Submit').click();"); | 576 ExecuteJsInSigninFrame("document.getElementById('Submit').click();"); |
| 577 | 577 |
| 578 EXPECT_EQ(l10n_util::GetStringUTF8(IDS_LOGIN_FATAL_ERROR_NO_EMAIL), | 578 EXPECT_EQ(l10n_util::GetStringUTF8(IDS_LOGIN_FATAL_ERROR_NO_ACCOUNT_DETAILS), |
| 579 WaitForAndGetFatalErrorMessage()); | 579 WaitForAndGetFatalErrorMessage()); |
| 580 } | 580 } |
| 581 | 581 |
| 582 // Tests the password confirm flow: show error on the first failure and | 582 // Tests the password confirm flow: show error on the first failure and |
| 583 // fatal error on the second failure. | 583 // fatal error on the second failure. |
| 584 IN_PROC_BROWSER_TEST_F(SamlTest, PasswordConfirmFlow) { | 584 IN_PROC_BROWSER_TEST_F(SamlTest, PasswordConfirmFlow) { |
| 585 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); | 585 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); |
| 586 StartSamlAndWaitForIdpPageLoad(kFirstSAMLUserEmail); | 586 StartSamlAndWaitForIdpPageLoad(kFirstSAMLUserEmail); |
| 587 | 587 |
| 588 // Fill-in the SAML IdP form and submit. | 588 // Fill-in the SAML IdP form and submit. |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 kTestAuthSIDCookie1, | 953 kTestAuthSIDCookie1, |
| 954 kTestAuthLSIDCookie1); | 954 kTestAuthLSIDCookie1); |
| 955 | 955 |
| 956 GetCookies(); | 956 GetCookies(); |
| 957 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); | 957 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); |
| 958 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); | 958 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); |
| 959 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); | 959 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); |
| 960 } | 960 } |
| 961 | 961 |
| 962 } // namespace chromeos | 962 } // namespace chromeos |
| OLD | NEW |