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

Unified Diff: content/test/test_render_frame_host.cc

Issue 2319733002: PlzNavigate: Fix DownloadRequestLimiterTest.DownloadRequestLimiter_RendererInitiated (Closed)
Patch Set: rebase Created 4 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
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 21557a28efce43d517d0f4214e40599ed79478b4..82fcac4f3d66c6b8f80f77e73c641fe0bd9c49e8 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -231,6 +231,22 @@ void TestRenderFrameHost::SimulateSwapOutACK() {
OnSwappedOut();
}
+void TestRenderFrameHost::NavigateAndCommitRendererInitiated(
+ int page_id,
+ bool did_create_new_entry,
+ const GURL& url) {
+ SendRendererInitiatedNavigationRequest(url, false);
+ // PlzNavigate: If no network request is needed by the navigation, then there
+ // will be no NavigationRequest, nor is it necessary to simulate the network
+ // stack commit.
+ if (frame_tree_node()->navigation_request())
+ PrepareForCommit();
+ bool browser_side_navigation = IsBrowserSideNavigationEnabled();
+ CHECK(!browser_side_navigation || is_loading());
+ CHECK(!browser_side_navigation || !frame_tree_node()->navigation_request());
+ SendNavigate(page_id, 0, did_create_new_entry, url);
+}
+
void TestRenderFrameHost::SendNavigate(int page_id,
int nav_entry_id,
bool did_create_new_entry,
@@ -365,22 +381,6 @@ void TestRenderFrameHost::SendNavigateWithParams(
OnDidCommitProvisionalLoad(msg);
}
-void TestRenderFrameHost::NavigateAndCommitRendererInitiated(
- int page_id,
- bool did_create_new_entry,
- const GURL& url) {
- SendRendererInitiatedNavigationRequest(url, false);
- // PlzNavigate: If no network request is needed by the navigation, then there
- // will be no NavigationRequest, nor is it necessary to simulate the network
- // stack commit.
- if (frame_tree_node()->navigation_request())
- PrepareForCommit();
- bool browser_side_navigation = IsBrowserSideNavigationEnabled();
- CHECK(!browser_side_navigation || is_loading());
- CHECK(!browser_side_navigation || !frame_tree_node()->navigation_request());
- SendNavigate(page_id, 0, did_create_new_entry, url);
-}
-
void TestRenderFrameHost::SendRendererInitiatedNavigationRequest(
const GURL& url,
bool has_user_gesture) {
« no previous file with comments | « content/test/test_render_frame_host.h ('k') | testing/buildbot/filters/browser-side-navigation.linux.unit_tests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698