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/frame_host/navigation_entry_impl.h" | 8 #include "content/browser/frame_host/navigation_entry_impl.h" |
9 #include "content/browser/renderer_host/render_view_host_factory.h" | 9 #include "content/browser/renderer_host/render_view_host_factory.h" |
10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 void RenderViewHostTestHarness::NavigateAndCommit(const GURL& url) { | 155 void RenderViewHostTestHarness::NavigateAndCommit(const GURL& url) { |
156 static_cast<TestWebContents*>(web_contents())->NavigateAndCommit(url); | 156 static_cast<TestWebContents*>(web_contents())->NavigateAndCommit(url); |
157 } | 157 } |
158 | 158 |
159 void RenderViewHostTestHarness::Reload() { | 159 void RenderViewHostTestHarness::Reload() { |
160 NavigationEntry* entry = controller().GetLastCommittedEntry(); | 160 NavigationEntry* entry = controller().GetLastCommittedEntry(); |
161 DCHECK(entry); | 161 DCHECK(entry); |
162 controller().Reload(false); | 162 controller().Reload(false); |
163 static_cast<TestRenderViewHost*>( | 163 static_cast<TestRenderViewHost*>( |
164 rvh())->SendNavigateWithTransition( | 164 rvh())->SendNavigateWithTransition( |
165 entry->GetPageID(), entry->GetURL(), PAGE_TRANSITION_RELOAD); | 165 entry->GetPageID(), entry->GetURL(), ui::PAGE_TRANSITION_RELOAD); |
166 } | 166 } |
167 | 167 |
168 void RenderViewHostTestHarness::FailedReload() { | 168 void RenderViewHostTestHarness::FailedReload() { |
169 NavigationEntry* entry = controller().GetLastCommittedEntry(); | 169 NavigationEntry* entry = controller().GetLastCommittedEntry(); |
170 DCHECK(entry); | 170 DCHECK(entry); |
171 controller().Reload(false); | 171 controller().Reload(false); |
172 static_cast<TestRenderViewHost*>( | 172 static_cast<TestRenderViewHost*>( |
173 rvh())->SendFailedNavigate(entry->GetPageID(), entry->GetURL()); | 173 rvh())->SendFailedNavigate(entry->GetPageID(), entry->GetURL()); |
174 } | 174 } |
175 | 175 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { | 228 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { |
229 return new TestBrowserContext(); | 229 return new TestBrowserContext(); |
230 } | 230 } |
231 | 231 |
232 void RenderViewHostTestHarness::SetRenderProcessHostFactory( | 232 void RenderViewHostTestHarness::SetRenderProcessHostFactory( |
233 RenderProcessHostFactory* factory) { | 233 RenderProcessHostFactory* factory) { |
234 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); | 234 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); |
235 } | 235 } |
236 | 236 |
237 } // namespace content | 237 } // namespace content |
OLD | NEW |