| 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 "content/public/test/test_renderer_host.h" | 5 #include "content/public/test/test_renderer_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "content/browser/frame_host/navigation_entry_impl.h" | 9 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 10 #include "content/browser/renderer_host/render_view_host_factory.h" | 10 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 11 #include "content/browser/renderer_host/render_widget_host_impl.h" | 11 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 12 #include "content/browser/site_instance_impl.h" | 12 #include "content/browser/site_instance_impl.h" |
| 13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
| 16 #include "content/public/test/mock_render_process_host.h" | 16 #include "content/public/test/mock_render_process_host.h" |
| 17 #include "content/public/test/test_browser_context.h" | 17 #include "content/public/test/test_browser_context.h" |
| 18 #include "content/test/browser_side_navigation_test_utils.h" | 18 #include "content/test/browser_side_navigation_test_utils.h" |
| 19 #include "content/test/content_browser_sanity_checker.h" | 19 #include "content/test/content_browser_sanity_checker.h" |
| 20 #include "content/test/test_navigation_handle_factory.h" |
| 20 #include "content/test/test_render_frame_host.h" | 21 #include "content/test/test_render_frame_host.h" |
| 21 #include "content/test/test_render_frame_host_factory.h" | 22 #include "content/test/test_render_frame_host_factory.h" |
| 22 #include "content/test/test_render_view_host.h" | 23 #include "content/test/test_render_view_host.h" |
| 23 #include "content/test/test_render_view_host_factory.h" | 24 #include "content/test/test_render_view_host_factory.h" |
| 24 #include "content/test/test_web_contents.h" | 25 #include "content/test/test_web_contents.h" |
| 25 | 26 |
| 26 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
| 27 #include "ui/base/win/scoped_ole_initializer.h" | 28 #include "ui/base/win/scoped_ole_initializer.h" |
| 28 #endif | 29 #endif |
| 29 | 30 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From(rvh); | 74 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From(rvh); |
| 74 return host_impl->has_touch_handler(); | 75 return host_impl->has_touch_handler(); |
| 75 } | 76 } |
| 76 | 77 |
| 77 | 78 |
| 78 // RenderViewHostTestEnabler -------------------------------------------------- | 79 // RenderViewHostTestEnabler -------------------------------------------------- |
| 79 | 80 |
| 80 RenderViewHostTestEnabler::RenderViewHostTestEnabler() | 81 RenderViewHostTestEnabler::RenderViewHostTestEnabler() |
| 81 : rph_factory_(new MockRenderProcessHostFactory()), | 82 : rph_factory_(new MockRenderProcessHostFactory()), |
| 82 rvh_factory_(new TestRenderViewHostFactory(rph_factory_.get())), | 83 rvh_factory_(new TestRenderViewHostFactory(rph_factory_.get())), |
| 83 rfh_factory_(new TestRenderFrameHostFactory()) {} | 84 rfh_factory_(new TestRenderFrameHostFactory()), |
| 85 handle_factory_(new TestNavigationHandleFactory()) {} |
| 84 | 86 |
| 85 RenderViewHostTestEnabler::~RenderViewHostTestEnabler() { | 87 RenderViewHostTestEnabler::~RenderViewHostTestEnabler() { |
| 86 } | 88 } |
| 87 | 89 |
| 88 | 90 |
| 89 // RenderViewHostTestHarness -------------------------------------------------- | 91 // RenderViewHostTestHarness -------------------------------------------------- |
| 90 | 92 |
| 91 RenderViewHostTestHarness::RenderViewHostTestHarness() | 93 RenderViewHostTestHarness::RenderViewHostTestHarness() |
| 92 : thread_bundle_options_(TestBrowserThreadBundle::DEFAULT) {} | 94 : thread_bundle_options_(TestBrowserThreadBundle::DEFAULT) {} |
| 93 | 95 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { | 248 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { |
| 247 return new TestBrowserContext(); | 249 return new TestBrowserContext(); |
| 248 } | 250 } |
| 249 | 251 |
| 250 void RenderViewHostTestHarness::SetRenderProcessHostFactory( | 252 void RenderViewHostTestHarness::SetRenderProcessHostFactory( |
| 251 RenderProcessHostFactory* factory) { | 253 RenderProcessHostFactory* factory) { |
| 252 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); | 254 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); |
| 253 } | 255 } |
| 254 | 256 |
| 255 } // namespace content | 257 } // namespace content |
| OLD | NEW |