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

Unified Diff: components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc

Issue 902843002: Credential Manager: Wire `notifySignedOut` to the PasswordStore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ASAN. Created 5 years, 10 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/content/browser/content_credential_manager_dispatcher_unittest.cc
diff --git a/components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc b/components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc
index e7bf309f978fe99980af153bb8a25c85d5ee5d7f..0c4c6dc84250f419a8ed1cc307446ae0388670c5 100644
--- a/components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc
+++ b/components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc
@@ -261,13 +261,32 @@ TEST_F(CredentialManagerDispatcherTest, CredentialManagerIncognitoSignedIn) {
}
TEST_F(CredentialManagerDispatcherTest, CredentialManagerOnNotifySignedOut) {
+ store_->AddLogin(form_);
+ store_->AddLogin(cross_origin_form_);
+ RunAllPendingTasks();
+
+ TestPasswordStore::PasswordMap passwords = store_->stored_passwords();
+ EXPECT_EQ(2U, passwords.size());
+ EXPECT_EQ(1U, passwords[form_.signon_realm].size());
+ EXPECT_EQ(1U, passwords[cross_origin_form_.signon_realm].size());
+ EXPECT_FALSE(passwords[form_.signon_realm][0].skip_zero_click);
+ EXPECT_FALSE(passwords[cross_origin_form_.signon_realm][0].skip_zero_click);
+
dispatcher()->OnNotifySignedOut(kRequestId);
+ RunAllPendingTasks();
const uint32 kMsgID = CredentialManagerMsg_AcknowledgeSignedOut::ID;
const IPC::Message* message =
process()->sink().GetFirstMessageMatching(kMsgID);
EXPECT_TRUE(message);
process()->sink().ClearMessages();
+
+ passwords = store_->stored_passwords();
+ EXPECT_EQ(2U, passwords.size());
+ EXPECT_EQ(1U, passwords[form_.signon_realm].size());
+ EXPECT_EQ(1U, passwords[cross_origin_form_.signon_realm].size());
+ EXPECT_TRUE(passwords[form_.signon_realm][0].skip_zero_click);
+ EXPECT_FALSE(passwords[cross_origin_form_.signon_realm][0].skip_zero_click);
}
TEST_F(CredentialManagerDispatcherTest,

Powered by Google App Engine
This is Rietveld 408576698