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/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "content/browser/renderer_host/render_view_host_factory.h" | 8 #include "content/browser/renderer_host/render_view_host_factory.h" |
9 #include "content/browser/renderer_host/render_widget_host_impl.h" | 9 #include "content/browser/renderer_host/render_widget_host_impl.h" |
10 #include "content/browser/renderer_host/test_render_view_host.h" | 10 #include "content/browser/renderer_host/test_render_view_host.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 rvh_factory_(new TestRenderViewHostFactory(rph_factory_.get())) { | 67 rvh_factory_(new TestRenderViewHostFactory(rph_factory_.get())) { |
68 } | 68 } |
69 | 69 |
70 RenderViewHostTestEnabler::~RenderViewHostTestEnabler() { | 70 RenderViewHostTestEnabler::~RenderViewHostTestEnabler() { |
71 } | 71 } |
72 | 72 |
73 | 73 |
74 // RenderViewHostTestHarness -------------------------------------------------- | 74 // RenderViewHostTestHarness -------------------------------------------------- |
75 | 75 |
76 RenderViewHostTestHarness::RenderViewHostTestHarness() | 76 RenderViewHostTestHarness::RenderViewHostTestHarness() |
77 : contents_(NULL), | 77 : thread_bundle_options_(TestBrowserThreadBundle::DEFAULT) {} |
78 thread_bundle_options_(TestBrowserThreadBundle::DEFAULT) { | |
79 } | |
80 | 78 |
81 RenderViewHostTestHarness::~RenderViewHostTestHarness() { | 79 RenderViewHostTestHarness::~RenderViewHostTestHarness() { |
82 } | 80 } |
83 | 81 |
84 NavigationController& RenderViewHostTestHarness::controller() { | 82 NavigationController& RenderViewHostTestHarness::controller() { |
85 return web_contents()->GetController(); | 83 return web_contents()->GetController(); |
86 } | 84 } |
87 | 85 |
88 WebContents* RenderViewHostTestHarness::web_contents() { | 86 WebContents* RenderViewHostTestHarness::web_contents() { |
89 return contents_.get(); | 87 return contents_.get(); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 browser_context_.release()); | 195 browser_context_.release()); |
198 thread_bundle_.reset(); | 196 thread_bundle_.reset(); |
199 } | 197 } |
200 | 198 |
201 void RenderViewHostTestHarness::SetRenderProcessHostFactory( | 199 void RenderViewHostTestHarness::SetRenderProcessHostFactory( |
202 RenderProcessHostFactory* factory) { | 200 RenderProcessHostFactory* factory) { |
203 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); | 201 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); |
204 } | 202 } |
205 | 203 |
206 } // namespace content | 204 } // namespace content |
OLD | NEW |