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

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: Removed other occurences of main_test_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 c4d6110136e74f26f25ba56cecc6bf0b0568bb3a..bc54c3c3824d907bdaa878b278c122557c87d637 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -204,6 +204,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) {
@@ -233,7 +240,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