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

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

Issue 2909283002: Delete PasswordStoreMac and SimplePasswordStoreMac. (Closed)
Patch Set: test Created 3 years, 7 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: components/password_manager/core/browser/login_database_unittest.cc
diff --git a/components/password_manager/core/browser/login_database_unittest.cc b/components/password_manager/core/browser/login_database_unittest.cc
index f219fd8be9eeac7104e9502439bd06a38c1624ca..b6a1011b18249f019d0ae6ea5b57f3cc52aaceb2 100644
--- a/components/password_manager/core/browser/login_database_unittest.cc
+++ b/components/password_manager/core/browser/login_database_unittest.cc
@@ -1650,37 +1650,6 @@ TEST_F(LoginDatabaseTest, PasswordReuseMetrics) {
base::Bucket(5, 1)));
}
-TEST_F(LoginDatabaseTest, ClearPasswordValues) {
- db().set_clear_password_values(true);
-
- // Add a PasswordForm, the password should be cleared.
- base::HistogramTester histogram_tester;
- PasswordForm form;
- form.origin = GURL("http://accounts.google.com/LoginAuth");
- form.signon_realm = "http://accounts.google.com/";
- form.username_value = ASCIIToUTF16("my_username");
- form.password_value = ASCIIToUTF16("12345");
- EXPECT_EQ(AddChangeForForm(form), db().AddLogin(form));
-
- std::vector<std::unique_ptr<PasswordForm>> result;
- EXPECT_TRUE(db().GetLogins(PasswordStore::FormDigest(form), &result));
- ASSERT_EQ(1U, result.size());
- PasswordForm expected_form = form;
- expected_form.password_value.clear();
- EXPECT_EQ(expected_form, *result[0]);
-
- // Update the password, it should stay empty.
- form.password_value = ASCIIToUTF16("password");
- EXPECT_EQ(UpdateChangeForForm(form), db().UpdateLogin(form));
- EXPECT_TRUE(db().GetLogins(PasswordStore::FormDigest(form), &result));
- ASSERT_EQ(1U, result.size());
- EXPECT_EQ(expected_form, *result[0]);
-
- // Encrypting/decrypting shouldn't happen. Thus there should be no keychain
- // access on Mac.
- histogram_tester.ExpectTotalCount("OSX.Keychain.Access", 0);
-}
-
#if defined(OS_POSIX)
// Only the current user has permission to read the database.
//

Powered by Google App Engine
This is Rietveld 408576698