Chromium Code Reviews| Index: chrome/browser/password_manager/native_backend_libsecret_unittest.cc |
| diff --git a/chrome/browser/password_manager/native_backend_libsecret_unittest.cc b/chrome/browser/password_manager/native_backend_libsecret_unittest.cc |
| index 5c3515eb44c9839eded2b79fed7814baa0294109..ec359c1f26ac1674843e2a0c8de24f798a9b809a 100644 |
| --- a/chrome/browser/password_manager/native_backend_libsecret_unittest.cc |
| +++ b/chrome/browser/password_manager/native_backend_libsecret_unittest.cc |
| @@ -693,29 +693,37 @@ TEST_F(NativeBackendLibsecretTest, PSLUpdatingStrictAddLogin) { |
| CheckPSLUpdate(UPDATE_BY_ADDLOGIN); |
| } |
| -TEST_F(NativeBackendLibsecretTest, FetchFederatedCredential) { |
| +TEST_F(NativeBackendLibsecretTest, FetchFederatedCredentialOnHTTPS) { |
| other_auth_.signon_realm = "federation://www.example.com/google.com"; |
| other_auth_.federation_origin = url::Origin(GURL("https://google.com/")); |
| EXPECT_TRUE(CheckCredentialAvailability(other_auth_, |
| - GURL("http://www.example.com/"), |
| + GURL("https://www.example.com/"), |
| PasswordForm::SCHEME_HTML, nullptr)); |
| } |
| -TEST_F(NativeBackendLibsecretTest, FetchPSLMatchedFederatedCredentialOnHTTPS) { |
| +TEST_F(NativeBackendLibsecretTest, DontFetchFederatedCredentialOnHTTP) { |
| other_auth_.signon_realm = "federation://www.example.com/google.com"; |
| other_auth_.federation_origin = url::Origin(GURL("https://google.com/")); |
| + EXPECT_FALSE(CheckCredentialAvailability(other_auth_, |
| + GURL("http://www.example.com/"), |
| + PasswordForm::SCHEME_HTML, nullptr)); |
| +} |
| + |
| +TEST_F(NativeBackendLibsecretTest, FetchPSLMatchedFederatedCredentialOnHTTPS) { |
| + other_auth_.signon_realm = "federation://www.sub.example.com/google.com"; |
| + other_auth_.federation_origin = url::Origin(GURL("https://google.com/")); |
| EXPECT_TRUE(CheckCredentialAvailability(other_auth_, |
| - GURL("https://www.example.com/"), |
| + GURL("https://www.sub.example.com/"), |
|
jdoerrie
2017/01/30 13:04:12
I missed this during the last CL. Let me know if i
vasilii
2017/01/30 13:29:50
I didn't get why the test is called "FetchPSLMatch
jdoerrie
2017/01/30 13:51:38
Yeah, you are right. Fixed.
|
| PasswordForm::SCHEME_HTML, nullptr)); |
| } |
| TEST_F(NativeBackendLibsecretTest, |
| DontFetchPSLMatchedFederatedCredentialOnHTTP) { |
| - other_auth_.signon_realm = "federation://www.example.com/google.com"; |
| + other_auth_.signon_realm = "federation://www.sub.example.com/google.com"; |
| other_auth_.federation_origin = url::Origin(GURL("https://google.com/")); |
| - EXPECT_TRUE(CheckCredentialAvailability(other_auth_, |
| - GURL("http://www.example.com/"), |
| - PasswordForm::SCHEME_HTML, nullptr)); |
| + EXPECT_FALSE(CheckCredentialAvailability(other_auth_, |
| + GURL("http://www.sub.example.com/"), |
| + PasswordForm::SCHEME_HTML, nullptr)); |
| } |
| TEST_F(NativeBackendLibsecretTest, BasicUpdateLogin) { |