Index: components/autofill/content/renderer/test_password_generation_agent.cc |
diff --git a/components/autofill/content/renderer/test_password_generation_agent.cc b/components/autofill/content/renderer/test_password_generation_agent.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2e4adb9b270d78611bcf3a3b12ce2aecc1b36731 |
--- /dev/null |
+++ b/components/autofill/content/renderer/test_password_generation_agent.cc |
@@ -0,0 +1,33 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "components/autofill/content/renderer/test_password_generation_agent.h" |
+ |
+namespace autofill { |
+ |
+TestPasswordGenerationAgent::TestPasswordGenerationAgent( |
+ content::RenderView* render_view) |
+ : PasswordGenerationAgent(render_view) { |
+ // Always enable when testing. |
+ set_enabled(true); |
+} |
+ |
+TestPasswordGenerationAgent::~TestPasswordGenerationAgent() {} |
+ |
+bool TestPasswordGenerationAgent::OnMessageReceived( |
+ const IPC::Message& message) { |
+ return PasswordGenerationAgent::OnMessageReceived(message); |
+} |
+ |
+bool TestPasswordGenerationAgent::ShouldAnalyzeDocument( |
+ const blink::WebDocument& document) const { |
+ return true; |
+} |
+ |
+bool TestPasswordGenerationAgent::Send(IPC::Message* message) { |
+ messages_.push_back(message); |
+ return true; |
+} |
+ |
+} // namespace autofill |