OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ | 5 #ifndef CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ |
6 #define CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ | 6 #define CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "chrome/renderer/autofill/autofill_agent.h" | 14 #include "chrome/renderer/autofill/autofill_agent.h" |
15 #include "chrome/renderer/mock_keyboard.h" | 15 #include "chrome/renderer/mock_keyboard.h" |
16 #include "chrome/renderer/mock_render_thread.h" | 16 #include "chrome/renderer/mock_render_thread.h" |
17 #include "content/common/main_function_params.h" | 17 #include "content/common/main_function_params.h" |
18 #include "content/common/native_web_keyboard_event.h" | 18 #include "content/common/native_web_keyboard_event.h" |
19 #include "content/common/sandbox_init_wrapper.h" | 19 #include "content/common/sandbox_init_wrapper.h" |
20 #include "content/renderer/render_view.h" | 20 #include "content/renderer/render_view_impl.h" |
21 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 21 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
22 #include "chrome/renderer/chrome_content_renderer_client.h" | 22 #include "chrome/renderer/chrome_content_renderer_client.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
25 | 25 |
26 namespace autofill { | 26 namespace autofill { |
27 class AutofillAgent; | 27 class AutofillAgent; |
28 class PasswordAutofillManager; | 28 class PasswordAutofillManager; |
29 } | 29 } |
30 | 30 |
31 class ExtensionDispatcher; | 31 class ExtensionDispatcher; |
32 class MockRenderProcess; | 32 class MockRenderProcess; |
33 class RendererMainPlatformDelegate; | 33 class RendererMainPlatformDelegate; |
| 34 class RenderViewImpl; |
34 | 35 |
35 class RenderViewTest : public testing::Test { | 36 class RenderViewTest : public testing::Test { |
36 public: | 37 public: |
37 // A special WebKitPlatformSupportImpl class for getting rid off the | 38 // A special WebKitPlatformSupportImpl class for getting rid off the |
38 // dependency to the sandbox, which is not available in RenderViewTest. | 39 // dependency to the sandbox, which is not available in RenderViewTest. |
39 class RendererWebKitPlatformSupportImplNoSandbox : | 40 class RendererWebKitPlatformSupportImplNoSandbox : |
40 public RendererWebKitPlatformSupportImpl { | 41 public RendererWebKitPlatformSupportImpl { |
41 public: | 42 public: |
42 virtual WebKit::WebSandboxSupport* sandboxSupport() { | 43 virtual WebKit::WebSandboxSupport* sandboxSupport() { |
43 return NULL; | 44 return NULL; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // testing::Test | 92 // testing::Test |
92 virtual void SetUp(); | 93 virtual void SetUp(); |
93 | 94 |
94 virtual void TearDown(); | 95 virtual void TearDown(); |
95 | 96 |
96 MessageLoop msg_loop_; | 97 MessageLoop msg_loop_; |
97 chrome::ChromeContentRendererClient chrome_content_renderer_client_; | 98 chrome::ChromeContentRendererClient chrome_content_renderer_client_; |
98 ExtensionDispatcher* extension_dispatcher_; | 99 ExtensionDispatcher* extension_dispatcher_; |
99 MockRenderThread render_thread_; | 100 MockRenderThread render_thread_; |
100 scoped_ptr<MockRenderProcess> mock_process_; | 101 scoped_ptr<MockRenderProcess> mock_process_; |
101 scoped_refptr<RenderView> view_; | 102 scoped_refptr<RenderViewImpl> view_; |
102 RendererWebKitPlatformSupportImplNoSandbox webkit_platform_support_; | 103 RendererWebKitPlatformSupportImplNoSandbox webkit_platform_support_; |
103 scoped_ptr<MockKeyboard> mock_keyboard_; | 104 scoped_ptr<MockKeyboard> mock_keyboard_; |
104 | 105 |
105 // Used to setup the process so renderers can run. | 106 // Used to setup the process so renderers can run. |
106 scoped_ptr<RendererMainPlatformDelegate> platform_; | 107 scoped_ptr<RendererMainPlatformDelegate> platform_; |
107 scoped_ptr<MainFunctionParams> params_; | 108 scoped_ptr<MainFunctionParams> params_; |
108 scoped_ptr<CommandLine> command_line_; | 109 scoped_ptr<CommandLine> command_line_; |
109 scoped_ptr<SandboxInitWrapper> sandbox_init_wrapper_; | 110 scoped_ptr<SandboxInitWrapper> sandbox_init_wrapper_; |
110 | 111 |
111 autofill::PasswordAutofillManager* password_autofill_; | 112 autofill::PasswordAutofillManager* password_autofill_; |
112 autofill::AutofillAgent* autofill_agent_; | 113 autofill::AutofillAgent* autofill_agent_; |
113 }; | 114 }; |
114 | 115 |
115 #endif // CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ | 116 #endif // CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ |
OLD | NEW |