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

Unified Diff: content/test/test_render_frame_host.cc

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Adding a DCHECK to probably make a lot of tests fail. Created 3 years, 11 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 c50f745c4b3516c3c49511ec649049180f65c49f..b06e5b5731819ecea716d71658c563d589d8e531 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -448,8 +448,10 @@ void TestRenderFrameHost::PrepareForCommitWithServerRedirect(
// PlzNavigate
NavigationRequest* request = frame_tree_node_->navigation_request();
CHECK(request);
- bool have_to_make_network_request = ShouldMakeNetworkRequestForURL(
- request->common_params().url);
+ bool have_to_make_network_request =
+ ShouldMakeNetworkRequestForURL(request->common_params().url) &&
+ !request->request_params().is_same_document_fragment_change &&
+ !request->request_params().is_same_document_history_load;
// Simulate a beforeUnload ACK from the renderer if the browser is waiting for
// it. If it runs it will update the request state.

Powered by Google App Engine
This is Rietveld 408576698