OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "chrome/browser/renderer_host/mock_render_process_host.h" | 11 #include "chrome/browser/renderer_host/mock_render_process_host.h" |
12 #include "chrome/browser/renderer_host/render_view_host.h" | 12 #include "chrome/browser/renderer_host/render_view_host.h" |
13 #include "chrome/browser/tab_contents/site_instance.h" | 13 #include "chrome/browser/tab_contents/site_instance.h" |
14 #include "chrome/browser/tab_contents/test_web_contents.h" | 14 #include "chrome/browser/tab_contents/test_web_contents.h" |
15 #include "chrome/test/testing_profile.h" | 15 #include "chrome/test/testing_profile.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
| 19 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
19 #include "chrome/browser/tab_contents/navigation_controller.h" | 20 #include "chrome/browser/tab_contents/navigation_controller.h" |
20 #elif defined(OS_POSIX) | 21 #elif defined(OS_POSIX) |
21 #include "chrome/common/temp_scaffolding_stubs.h" | 22 #include "chrome/common/temp_scaffolding_stubs.h" |
22 #endif | 23 #endif |
23 | 24 |
24 #if !defined(OS_MACOSX) | |
25 #include "chrome/browser/renderer_host/render_widget_host_view.h" | |
26 #endif | |
27 | |
28 class TestWebContents; | 25 class TestWebContents; |
29 | 26 |
30 // This file provides a testing framework for mocking out the RenderProcessHost | 27 // This file provides a testing framework for mocking out the RenderProcessHost |
31 // layer. It allows you to test RenderViewHost, WebContents, | 28 // layer. It allows you to test RenderViewHost, WebContents, |
32 // NavigationController, and other layers above that without running an actual | 29 // NavigationController, and other layers above that without running an actual |
33 // renderer process. | 30 // renderer process. |
34 // | 31 // |
35 // To use, derive your test base class from RenderViewHostTestHarness. | 32 // To use, derive your test base class from RenderViewHostTestHarness. |
36 | 33 |
37 // TestRenderViewHostView ------------------------------------------------------ | 34 // TestRenderViewHostView ------------------------------------------------------ |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // We clean up the WebContents by calling CloseContents, which deletes itself. | 215 // We clean up the WebContents by calling CloseContents, which deletes itself. |
219 // This in turn causes the destruction of these other things. | 216 // This in turn causes the destruction of these other things. |
220 MockRenderProcessHost* process_; | 217 MockRenderProcessHost* process_; |
221 TestWebContents* contents_; | 218 TestWebContents* contents_; |
222 NavigationController* controller_; | 219 NavigationController* controller_; |
223 | 220 |
224 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 221 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
225 }; | 222 }; |
226 | 223 |
227 #endif // CHROME_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ | 224 #endif // CHROME_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ |
OLD | NEW |