| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/test/base/chrome_render_view_test.h" | 5 #include "chrome/test/base/chrome_render_view_test.h" |
| 6 | 6 |
| 7 #include "base/debug/leak_annotations.h" | 7 #include "base/debug/leak_annotations.h" |
| 8 #include "chrome/browser/chrome_content_browser_client.h" | 8 #include "chrome/browser/chrome_content_browser_client.h" |
| 9 #include "chrome/common/chrome_content_client.h" | 9 #include "chrome/common/chrome_content_client.h" |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| 11 #include "chrome/renderer/chrome_content_renderer_client.h" | 11 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 12 #include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h" | 12 #include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h" |
| 13 #include "chrome/renderer/spellchecker/spellcheck.h" | 13 #include "chrome/renderer/spellchecker/spellcheck.h" |
| 14 #include "chrome/test/base/chrome_unit_test_suite.h" | 14 #include "chrome/test/base/chrome_unit_test_suite.h" |
| 15 #include "components/autofill/content/renderer/autofill_agent.h" | 15 #include "components/autofill/content/renderer/autofill_agent.h" |
| 16 #include "components/autofill/content/renderer/password_autofill_agent.h" | 16 #include "components/autofill/content/renderer/password_autofill_agent.h" |
| 17 #include "components/autofill/content/renderer/test_password_autofill_agent.h" | 17 #include "components/autofill/content/renderer/test_password_autofill_agent.h" |
| 18 #include "components/autofill/content/renderer/test_password_generation_agent.h" | 18 #include "components/autofill/content/renderer/test_password_generation_agent.h" |
| 19 #include "components/password_manager/content/renderer/test_credential_manager_c
lient.h" |
| 19 #include "content/public/browser/native_web_keyboard_event.h" | 20 #include "content/public/browser/native_web_keyboard_event.h" |
| 20 #include "content/public/common/renderer_preferences.h" | 21 #include "content/public/common/renderer_preferences.h" |
| 21 #include "content/public/renderer/render_view.h" | 22 #include "content/public/renderer/render_view.h" |
| 22 #include "extensions/browser/extension_function_dispatcher.h" | 23 #include "extensions/browser/extension_function_dispatcher.h" |
| 23 #include "extensions/common/extension.h" | 24 #include "extensions/common/extension.h" |
| 24 #include "extensions/renderer/dispatcher.h" | 25 #include "extensions/renderer/dispatcher.h" |
| 25 #include "extensions/renderer/event_bindings.h" | 26 #include "extensions/renderer/event_bindings.h" |
| 26 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 27 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 27 #include "third_party/WebKit/public/web/WebFrame.h" | 28 #include "third_party/WebKit/public/web/WebFrame.h" |
| 28 #include "third_party/WebKit/public/web/WebInputEvent.h" | 29 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 content::ContentBrowserClient* | 91 content::ContentBrowserClient* |
| 91 ChromeRenderViewTest::CreateContentBrowserClient() { | 92 ChromeRenderViewTest::CreateContentBrowserClient() { |
| 92 return new chrome::ChromeContentBrowserClient(); | 93 return new chrome::ChromeContentBrowserClient(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 content::ContentRendererClient* | 96 content::ContentRendererClient* |
| 96 ChromeRenderViewTest::CreateContentRendererClient() { | 97 ChromeRenderViewTest::CreateContentRendererClient() { |
| 97 extension_dispatcher_delegate_.reset( | 98 extension_dispatcher_delegate_.reset( |
| 98 new ChromeExtensionsDispatcherDelegate()); | 99 new ChromeExtensionsDispatcherDelegate()); |
| 99 ChromeContentRendererClient* client = new ChromeContentRendererClient(); | 100 ChromeContentRendererClient* client = new ChromeContentRendererClient(); |
| 101 client->SetCredentialManagerClientForTest( |
| 102 new password_manager::TestCredentialManagerClient()); |
| 100 client->SetExtensionDispatcherForTest( | 103 client->SetExtensionDispatcherForTest( |
| 101 new extensions::Dispatcher(extension_dispatcher_delegate_.get())); | 104 new extensions::Dispatcher(extension_dispatcher_delegate_.get())); |
| 102 #if defined(ENABLE_SPELLCHECK) | 105 #if defined(ENABLE_SPELLCHECK) |
| 103 client->SetSpellcheck(new SpellCheck()); | 106 client->SetSpellcheck(new SpellCheck()); |
| 104 #endif | 107 #endif |
| 105 return client; | 108 return client; |
| 106 } | 109 } |
| OLD | NEW |