| 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) {
|
|
|