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

Unified Diff: content/test/test_render_frame_host.cc

Issue 1048463004: PlzNavigate: track pending commits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved state tracking to RFH Created 5 years, 8 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
Index: content/test/test_render_frame_host.cc
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index 93bc602599602e5a8ce517628c914dc2b1c966c9..c0c2d907ffc3913d2da2f2faa48ab68e4b405dcd 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -200,6 +200,13 @@ void TestRenderFrameHost::SendNavigateWithParameters(
OnDidCommitProvisionalLoad(msg);
}
+void TestRenderFrameHost::NavigateAndCommitRendererInitiated(int page_id,
+ const GURL& url) {
+ SendRendererInitiatedNavigationRequest(url, false);
+ PrepareForCommit();
+ SendNavigate(page_id, url);
+}
+
void TestRenderFrameHost::SendRendererInitiatedNavigationRequest(
const GURL& url,
bool has_user_gesture) {
@@ -229,7 +236,8 @@ void TestRenderFrameHost::PrepareForCommitWithServerRedirect(
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation)) {
// Non PlzNavigate
- SendBeforeUnloadACK(true);
+ if (IsWaitingForBeforeUnloadACK())
+ SendBeforeUnloadACK(true);
return;
}

Powered by Google App Engine
This is Rietveld 408576698