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 CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "content/browser/renderer_host/mock_render_process_host.h" | 13 #include "content/browser/renderer_host/mock_render_process_host.h" |
14 #include "content/browser/renderer_host/render_view_host.h" | 14 #include "content/browser/renderer_host/render_view_host.h" |
15 #include "content/browser/renderer_host/render_view_host_factory.h" | 15 #include "content/browser/renderer_host/render_view_host_factory.h" |
16 #include "content/browser/renderer_host/render_widget_host_view.h" | 16 #include "content/browser/renderer_host/render_widget_host_view.h" |
17 #include "content/common/page_transition_types.h" | 17 #include "content/common/page_transition_types.h" |
18 #include "chrome/test/base/testing_browser_process_test.h" | |
19 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
20 | 19 |
21 namespace gfx { | 20 namespace gfx { |
22 class Rect; | 21 class Rect; |
23 } | 22 } |
24 | 23 |
25 class NavigationController; | 24 class NavigationController; |
26 class SiteInstance; | 25 class SiteInstance; |
27 class TestingProfile; | 26 class TestingProfile; |
28 class TestTabContents; | 27 class TestTabContents; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 // Instead, we set it right before we create a new RenderViewHost, which | 275 // Instead, we set it right before we create a new RenderViewHost, which |
277 // happens before the RenderProcessHost is created. This way, the instance | 276 // happens before the RenderProcessHost is created. This way, the instance |
278 // has the correct factory and creates our special RenderProcessHosts. | 277 // has the correct factory and creates our special RenderProcessHosts. |
279 RenderProcessHostFactory* render_process_host_factory_; | 278 RenderProcessHostFactory* render_process_host_factory_; |
280 | 279 |
281 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory); | 280 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory); |
282 }; | 281 }; |
283 | 282 |
284 // RenderViewHostTestHarness --------------------------------------------------- | 283 // RenderViewHostTestHarness --------------------------------------------------- |
285 | 284 |
286 class RenderViewHostTestHarness : public TestingBrowserProcessTest { | 285 class RenderViewHostTestHarness : public testing::Test { |
287 public: | 286 public: |
288 RenderViewHostTestHarness(); | 287 RenderViewHostTestHarness(); |
289 virtual ~RenderViewHostTestHarness(); | 288 virtual ~RenderViewHostTestHarness(); |
290 | 289 |
291 NavigationController& controller(); | 290 NavigationController& controller(); |
292 virtual TestTabContents* contents(); | 291 virtual TestTabContents* contents(); |
293 TestRenderViewHost* rvh(); | 292 TestRenderViewHost* rvh(); |
294 TestRenderViewHost* pending_rvh(); | 293 TestRenderViewHost* pending_rvh(); |
295 TestRenderViewHost* active_rvh(); | 294 TestRenderViewHost* active_rvh(); |
296 TestingProfile* profile(); | 295 TestingProfile* profile(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 MockRenderProcessHostFactory rph_factory_; | 327 MockRenderProcessHostFactory rph_factory_; |
329 TestRenderViewHostFactory rvh_factory_; | 328 TestRenderViewHostFactory rvh_factory_; |
330 | 329 |
331 private: | 330 private: |
332 scoped_ptr<TestTabContents> contents_; | 331 scoped_ptr<TestTabContents> contents_; |
333 | 332 |
334 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 333 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
335 }; | 334 }; |
336 | 335 |
337 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 336 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ |
OLD | NEW |