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

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

Issue 180993003: Revert "Revert 249676 "Have the unload event execute in background on cr..."" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete RFH pending shutdown in all nodes of the FrameTree Created 6 years, 9 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
« 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 28 matching lines...) Expand all
39 // static 39 // static
40 RenderViewHost* RenderViewHostTester::GetPendingForController( 40 RenderViewHost* RenderViewHostTester::GetPendingForController(
41 NavigationController* controller) { 41 NavigationController* controller) {
42 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>( 42 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(
43 controller->GetWebContents()); 43 controller->GetWebContents());
44 return web_contents->GetRenderManagerForTesting()->pending_render_view_host(); 44 return web_contents->GetRenderManagerForTesting()->pending_render_view_host();
45 } 45 }
46 46
47 // static 47 // static
48 bool RenderViewHostTester::IsRenderViewHostSwappedOut(RenderViewHost* rvh) { 48 bool RenderViewHostTester::IsRenderViewHostSwappedOut(RenderViewHost* rvh) {
49 return static_cast<RenderViewHostImpl*>(rvh)->is_swapped_out(); 49 return static_cast<RenderViewHostImpl*>(rvh)->rvh_state() ==
50 RenderViewHostImpl::STATE_SWAPPED_OUT;
50 } 51 }
51 52
52 // static 53 // static
53 bool RenderViewHostTester::TestOnMessageReceived(RenderViewHost* rvh, 54 bool RenderViewHostTester::TestOnMessageReceived(RenderViewHost* rvh,
54 const IPC::Message& msg) { 55 const IPC::Message& msg) {
55 return static_cast<RenderViewHostImpl*>(rvh)->OnMessageReceived(msg); 56 return static_cast<RenderViewHostImpl*>(rvh)->OnMessageReceived(msg);
56 } 57 }
57 58
58 // static 59 // static
59 bool RenderViewHostTester::HasTouchEventHandler(RenderViewHost* rvh) { 60 bool RenderViewHostTester::HasTouchEventHandler(RenderViewHost* rvh) {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 213 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
213 return new TestBrowserContext(); 214 return new TestBrowserContext();
214 } 215 }
215 216
216 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 217 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
217 RenderProcessHostFactory* factory) { 218 RenderProcessHostFactory* factory) {
218 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 219 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
219 } 220 }
220 221
221 } // namespace content 222 } // 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