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

Unified Diff: components/password_manager/core/browser/password_store_unittest.cc

Issue 1314903003: Updating of all entries in PasswordManager of the same credentials on password update (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bot fix Created 5 years, 3 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
« no previous file with comments | « components/password_manager/core/browser/password_store.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_store_unittest.cc
diff --git a/components/password_manager/core/browser/password_store_unittest.cc b/components/password_manager/core/browser/password_store_unittest.cc
index 3dc5f13ddd7004361e3cf24322a9c51ebce936e6..ba7c217af1966fcd592d8eb41fac364ee4de9301 100644
--- a/components/password_manager/core/browser/password_store_unittest.cc
+++ b/components/password_manager/core/browser/password_store_unittest.cc
@@ -450,11 +450,8 @@ TEST_F(PasswordStoreTest, GetLoginsWithoutAffiliations) {
expected_results.push_back(new PasswordForm(*all_credentials[0]));
expected_results.push_back(new PasswordForm(*all_credentials[1]));
for (PasswordForm* result : expected_results) {
- if (result->signon_realm == observed_form.signon_realm)
- continue;
- result->original_signon_realm = result->signon_realm;
- result->origin = observed_form.origin;
- result->signon_realm = observed_form.signon_realm;
+ if (result->signon_realm != observed_form.signon_realm)
+ result->is_public_suffix_match = true;
}
std::vector<std::string> no_affiliated_android_realms;
@@ -516,7 +513,8 @@ TEST_F(PasswordStoreTest, GetLoginsWithAffiliations) {
kTestUnrelatedAndroidRealm,
"", "", L"", L"", L"",
L"username_value_5",
- L"", true, true, 1}};
+ L"", true, true, 1}
+ };
/* clang-format on */
scoped_refptr<PasswordStoreDefault> store(new PasswordStoreDefault(
@@ -549,11 +547,9 @@ TEST_F(PasswordStoreTest, GetLoginsWithAffiliations) {
expected_results.push_back(new PasswordForm(*all_credentials[3]));
expected_results.push_back(new PasswordForm(*all_credentials[4]));
for (PasswordForm* result : expected_results) {
- if (result->signon_realm == observed_form.signon_realm)
- continue;
- result->original_signon_realm = result->signon_realm;
- result->signon_realm = observed_form.signon_realm;
- result->origin = observed_form.origin;
+ if (result->signon_realm != observed_form.signon_realm &&
+ !IsValidAndroidFacetURI(result->signon_realm))
+ result->is_public_suffix_match = true;
}
std::vector<std::string> affiliated_android_realms;
« no previous file with comments | « components/password_manager/core/browser/password_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698