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

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: Created 4 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/renderer/render_view_browsertest.cc
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 4902d5052919f0f1bdcbf2fb2bbdfb9c292dd5ff..4b8b7dbbacd5ca5e1150e232aeecc8f40e1a0867 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -584,6 +584,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;
@@ -594,7 +599,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