Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1791)

Unified Diff: chrome/browser/password_manager/native_backend_gnome_x_unittest.cc

Issue 2652243002: Implement Federated PSL Matches in Native Backends (Closed)
Patch Set: Addressed comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
diff --git a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
index e62dc9beb79215838423bd13cceade78a3bfcc44..7080a52bf542ed493b2d1ef8e65f0225d1aca2e7 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
@@ -894,6 +894,22 @@ TEST_F(NativeBackendGnomeTest, FetchFederatedCredential) {
PasswordForm::SCHEME_HTML, nullptr));
}
+TEST_F(NativeBackendGnomeTest, 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/"),
+ PasswordForm::SCHEME_HTML, nullptr));
+}
+
+TEST_F(NativeBackendGnomeTest, DontFetchPSLMatchedFederatedCredentialOnHTTP) {
+ other_auth_.signon_realm = "federation://www.sub.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(NativeBackendGnomeTest, BasicUpdateLogin) {
NativeBackendGnome backend(42);
backend.Init();

Powered by Google App Engine
This is Rietveld 408576698