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

Unified Diff: content/test/test_render_frame_host.cc

Issue 914223002: PlzNavigate: Updated navigation cancel policy for renderer-initiated requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from CR comments. Created 5 years, 10 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 d629a9e92608209195883a9c491101909dcd9286..9249d2609ab7ce9f6e779c4223cb2112a8edbb0e 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -187,9 +187,10 @@ void TestRenderFrameHost::SendNavigateWithParameters(
OnDidCommitProvisionalLoad(msg);
}
-void TestRenderFrameHost::SendBeginNavigationWithURL(const GURL& url) {
- BeginNavigationParams begin_params(
- "GET", std::string(), net::LOAD_NORMAL, false);
+void TestRenderFrameHost::SendBeginNavigationWithURL(const GURL& url,
+ bool has_user_gesture) {
+ BeginNavigationParams begin_params("GET", std::string(), net::LOAD_NORMAL,
+ has_user_gesture);
CommonNavigationParams common_params;
common_params.url = url;
common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault);
@@ -215,9 +216,9 @@ void TestRenderFrameHost::PrepareForCommit(const GURL& url) {
static_cast<NavigatorImpl*>(frame_tree_node_->navigator())
->GetNavigationRequestForNodeForTesting(frame_tree_node_);
- // We are simulating a renderer-initiated navigation.
+ // We are simulating a renderer-initiated user-initiated navigation.
if (!request) {
- SendBeginNavigationWithURL(url);
+ SendBeginNavigationWithURL(url, true);
request = static_cast<NavigatorImpl*>(frame_tree_node_->navigator())
->GetNavigationRequestForNodeForTesting(frame_tree_node_);
}

Powered by Google App Engine
This is Rietveld 408576698