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

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: Addressed comments 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 7b0e511305d15b2ad0f29b08aa84ef9ed4ccc17c..d8fc3d825a3f2ea2d8c4536dab3d673bd68dda9e 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