| Index: chrome/browser/password_manager/password_manager_test_base.h
|
| diff --git a/chrome/browser/password_manager/password_manager_test_base.h b/chrome/browser/password_manager/password_manager_test_base.h
|
| index 2a134ac98b5a7f375aea5cfea707687d9116486f..1135de863df14c0e4247a651a15bb08438341913 100644
|
| --- a/chrome/browser/password_manager/password_manager_test_base.h
|
| +++ b/chrome/browser/password_manager/password_manager_test_base.h
|
| @@ -8,6 +8,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| +#include "components/password_manager/core/browser/password_store_consumer.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/test/test_utils.h"
|
|
|
| @@ -15,6 +16,10 @@ namespace autofill {
|
| struct PasswordForm;
|
| }
|
|
|
| +namespace password_manager {
|
| +class PasswordStore;
|
| +}
|
| +
|
| class NavigationObserver : public content::WebContentsObserver {
|
| public:
|
| explicit NavigationObserver(content::WebContents* web_contents);
|
| @@ -52,6 +57,26 @@ class NavigationObserver : public content::WebContentsObserver {
|
| DISALLOW_COPY_AND_ASSIGN(NavigationObserver);
|
| };
|
|
|
| +class DummyStoreConsumer : public password_manager::PasswordStoreConsumer {
|
| + public:
|
| + DummyStoreConsumer();
|
| + ~DummyStoreConsumer() override;
|
| +
|
| + // password_manager::PasswordStoreConsumer
|
| + void OnGetPasswordStoreResults(
|
| + ScopedVector<autofill::PasswordForm> results) override;
|
| +
|
| + // Make a dummy GetLogins() request ot |password_store| and wait for its
|
| + // response
|
| + void RequestLoginsAndWait(
|
| + scoped_refptr<password_manager::PasswordStore> password_store);
|
| +
|
| + private:
|
| + scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DummyStoreConsumer);
|
| +};
|
| +
|
| // Observes the save password prompt (bubble or infobar) for a specified
|
| // WebContents, keeps track of whether or not it is currently shown, and allows
|
| // accepting saving passwords through it.
|
|
|