Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1781)

Side by Side Diff: content/public/test/test_renderer_host.cc

Issue 88503002: Have the unload event execute in background on cross-site navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Charlie's comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 // static 38 // static
39 RenderViewHost* RenderViewHostTester::GetPendingForController( 39 RenderViewHost* RenderViewHostTester::GetPendingForController(
40 NavigationController* controller) { 40 NavigationController* controller) {
41 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>( 41 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(
42 controller->GetWebContents()); 42 controller->GetWebContents());
43 return web_contents->GetRenderManagerForTesting()->pending_render_view_host(); 43 return web_contents->GetRenderManagerForTesting()->pending_render_view_host();
44 } 44 }
45 45
46 // static 46 // static
47 bool RenderViewHostTester::IsRenderViewHostSwappedOut(RenderViewHost* rvh) { 47 bool RenderViewHostTester::IsRenderViewHostSwappedOut(RenderViewHost* rvh) {
48 return static_cast<RenderViewHostImpl*>(rvh)->is_swapped_out(); 48 return static_cast<RenderViewHostImpl*>(rvh)->rvh_state() ==
49 RenderViewHostImpl::STATE_SWAPPED_OUT;
49 } 50 }
50 51
51 // static 52 // static
52 bool RenderViewHostTester::TestOnMessageReceived(RenderViewHost* rvh, 53 bool RenderViewHostTester::TestOnMessageReceived(RenderViewHost* rvh,
53 const IPC::Message& msg) { 54 const IPC::Message& msg) {
54 return static_cast<RenderViewHostImpl*>(rvh)->OnMessageReceived(msg); 55 return static_cast<RenderViewHostImpl*>(rvh)->OnMessageReceived(msg);
55 } 56 }
56 57
57 // static 58 // static
58 bool RenderViewHostTester::HasTouchEventHandler(RenderViewHost* rvh) { 59 bool RenderViewHostTester::HasTouchEventHandler(RenderViewHost* rvh) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 208 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
208 return new TestBrowserContext(); 209 return new TestBrowserContext();
209 } 210 }
210 211
211 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 212 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
212 RenderProcessHostFactory* factory) { 213 RenderProcessHostFactory* factory) {
213 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 214 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
214 } 215 }
215 216
216 } // namespace content 217 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698