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

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

Issue 2607413003: Add security feature to ProvisionalSavePassword (Closed)
Patch Set: More explicit unittest, log origins, and update histogram description. 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/password_manager_test_base.cc
diff --git a/chrome/browser/password_manager/password_manager_test_base.cc b/chrome/browser/password_manager/password_manager_test_base.cc
index 44180f52543ecb00f87c1bb0d8c483b1448dd1ff..a7cdb19eb4fa71f713e5b0a825fa9553d74b191f 100644
--- a/chrome/browser/password_manager/password_manager_test_base.cc
+++ b/chrome/browser/password_manager/password_manager_test_base.cc
@@ -92,6 +92,15 @@ void BubbleObserver::AcceptUpdatePrompt(
EXPECT_FALSE(IsShowingUpdatePrompt());
}
+void PasswordStoreResultsObserver::OnGetPasswordStoreResults(
+ std::vector<std::unique_ptr<autofill::PasswordForm>> results) {
+ run_loop_.Quit();
+}
+
+void PasswordStoreResultsObserver::Wait() {
+ run_loop_.Run();
+}
+
PasswordManagerBrowserTestBase::PasswordManagerBrowserTestBase() {
}
PasswordManagerBrowserTestBase::~PasswordManagerBrowserTestBase() {
@@ -230,6 +239,15 @@ void PasswordManagerBrowserTestBase::WaitForElementValue(
<< ", expected_value = " << expected_value;
}
+void PasswordManagerBrowserTestBase::WaitForPasswordStore() {
+ scoped_refptr<password_manager::PasswordStore> password_store =
+ PasswordStoreFactory::GetForProfile(browser()->profile(),
+ ServiceAccessType::IMPLICIT_ACCESS);
+ PasswordStoreResultsObserver syncer;
+ password_store->GetAutofillableLoginsWithAffiliatedRealms(&syncer);
+ syncer.Wait();
+}
+
void PasswordManagerBrowserTestBase::CheckElementValue(
const std::string& element_id,
const std::string& expected_value) {

Powered by Google App Engine
This is Rietveld 408576698