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

Unified Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 606113005: Move RenderViewHost swap out state to RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review suggestions Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/browser_with_test_window_test.cc
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index 040cb5e6e34974c33119e404baea647eeb1eb718..4b3d6d200032b40d493e4ad7df7123ac8e2dbdd9 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -34,6 +34,8 @@
#endif
using content::NavigationController;
+using content::RenderFrameHost;
+using content::RenderFrameHostTester;
using content::RenderViewHost;
using content::RenderViewHostTester;
using content::WebContents;
@@ -135,6 +137,7 @@ void BrowserWithTestWindowTest::CommitPendingLoad(
RenderViewHost* old_rvh =
controller->GetWebContents()->GetRenderViewHost();
+ RenderFrameHost* old_rfh = old_rvh->GetMainFrame();
RenderViewHost* pending_rvh = RenderViewHostTester::GetPendingForController(
controller);
@@ -142,7 +145,7 @@ void BrowserWithTestWindowTest::CommitPendingLoad(
// Simulate the BeforeUnload_ACK that is received from the current renderer
// for a cross-site navigation.
DCHECK_NE(old_rvh, pending_rvh);
- RenderViewHostTester::For(old_rvh)->SendBeforeUnloadACK(true);
+ RenderFrameHostTester::For(old_rfh)->SendBeforeUnloadACK(true);
}
// Commit on the pending_rvh, if one exists.
RenderViewHost* test_rvh = pending_rvh ? pending_rvh : old_rvh;
@@ -150,7 +153,7 @@ void BrowserWithTestWindowTest::CommitPendingLoad(
// Simulate a SwapOut_ACK before the navigation commits.
if (pending_rvh)
- RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK();
+ RenderFrameHostTester::For(old_rfh)->SimulateSwapOutACK();
// For new navigations, we need to send a larger page ID. For renavigations,
// we need to send the preexisting page ID. We can tell these apart because
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698