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

Unified Diff: content/renderer/render_view_browsertest.cc

Issue 1608283002: PlzNavigate: Use WebNavigationPolicyHandledByClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@change-did-start-loading-logic
Patch Set: Rebase Created 4 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/renderer/render_view_browsertest.cc
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 31e6b1f8c3372de5b3f0b9e112b800707e477088..a12cdcb4996fd43655758eee43a9b017c4ab3e68 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -586,6 +586,11 @@ TEST_F(RenderViewImplTest, DecideNavigationPolicy) {
// Navigations to normal HTTP URLs can be handled locally.
blink::WebURLRequest request(GURL("http://foo.com"));
+ request.setFetchRequestMode(blink::WebURLRequest::FetchRequestModeNavigate);
+ request.setFetchCredentialsMode(
+ blink::WebURLRequest::FetchCredentialsModeInclude);
+ request.setFetchRedirectMode(blink::WebURLRequest::FetchRedirectModeManual);
+ request.setFrameType(blink::WebURLRequest::FrameTypeTopLevel);
blink::WebFrameClient::NavigationPolicyInfo policy_info(request);
policy_info.navigationType = blink::WebNavigationTypeLinkClicked;
policy_info.defaultPolicy = blink::WebNavigationPolicyCurrentTab;
@@ -596,7 +601,7 @@ TEST_F(RenderViewImplTest, DecideNavigationPolicy) {
} else {
// If this is a renderer-initiated navigation that just begun, it should
// stop and be sent to the browser.
- EXPECT_EQ(blink::WebNavigationPolicyIgnore, policy);
+ EXPECT_EQ(blink::WebNavigationPolicyHandledByClient, policy);
// If this a navigation that is ready to commit, it should be handled
// locally.

Powered by Google App Engine
This is Rietveld 408576698