| Index: components/autofill/content/renderer/test_password_autofill_agent.h
|
| diff --git a/components/autofill/content/renderer/test_password_autofill_agent.h b/components/autofill/content/renderer/test_password_autofill_agent.h
|
| index 01f5a4b07387e444cc571f07d77320a95c581348..cbd73592989698296c428211ccad164ff9145eec 100644
|
| --- a/components/autofill/content/renderer/test_password_autofill_agent.h
|
| +++ b/components/autofill/content/renderer/test_password_autofill_agent.h
|
| @@ -5,7 +5,11 @@
|
| #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_TEST_PASSWORD_AUTOFILL_AGENT_H_
|
| #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_TEST_PASSWORD_AUTOFILL_AGENT_H_
|
|
|
| +#include <vector>
|
| +
|
| +#include "base/memory/scoped_vector.h"
|
| #include "components/autofill/content/renderer/password_autofill_agent.h"
|
| +#include "ipc/ipc_message.h"
|
|
|
| namespace autofill {
|
|
|
| @@ -14,12 +18,30 @@ class TestPasswordAutofillAgent : public PasswordAutofillAgent {
|
| explicit TestPasswordAutofillAgent(content::RenderView* render_view);
|
| virtual ~TestPasswordAutofillAgent();
|
|
|
| + // content::RenderViewObserver implementation:
|
| + virtual bool Send(IPC::Message* message) OVERRIDE;
|
| +
|
| + // Access messages that would have been sent to the browser.
|
| + const std::vector<IPC::Message*>& messages() const { return messages_.get(); }
|
| +
|
| + // Enqueue messages and do not forward them.
|
| + void pause_messages() { pause_messages_ = true; }
|
| +
|
| + // Stop enqueuing messages and forward on all received messages.
|
| + void resume_messages();
|
| +
|
| + void clear_messages() { messages_.clear(); }
|
| +
|
| private:
|
| // Always returns true. This allows browser tests with "data: " URL scheme to
|
| // work with the password manager.
|
| // PasswordAutofillAgent:
|
| virtual bool OriginCanAccessPasswordManager(
|
| const blink::WebSecurityOrigin& origin) OVERRIDE;
|
| +
|
| + ScopedVector<IPC::Message> messages_;
|
| +
|
| + bool pause_messages_;
|
| };
|
|
|
| } // namespace autofill
|
|
|