Commit 42ab9dc8 authored by Arthur Hemery's avatar Arthur Hemery Committed by Chromium LUCI CQ

[CORS-RFC1918] Enabling blocking flag on WPT

Enable kBlockInsecurePrivateNetworkRequests by default on WPTs. Also
fixes a handful of tests expectations following this change.

Bug: 1154729
Change-Id: I3fd5810f6b511bf7b1100c66499e576d6f3c0055
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611721Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Commit-Queue: Arthur Hemery <ahemery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843550}
parent b5f1d321
......@@ -71,6 +71,9 @@ GetSwitchDependentFeatureOverrides(const base::CommandLine& command_line) {
{switches::kEnableExperimentalWebPlatformFeatures,
std::cref(net::features::kSchemefulSameSite),
base::FeatureList::OVERRIDE_ENABLE_FEATURE},
{switches::kEnableExperimentalWebPlatformFeatures,
std::cref(features::kBlockInsecurePrivateNetworkRequests),
base::FeatureList::OVERRIDE_ENABLE_FEATURE},
// Overrides for --enable-experimental-cookie-features.
{switches::kEnableExperimentalCookieFeatures,
......
......@@ -331,11 +331,8 @@
},
{
"prefix": "cors-rfc1918",
"bases": ["http/tests/security/cors-rfc1918",
"external/wpt/cors-rfc1918",
"external/wpt/fetch/cors-rfc1918"],
"args": ["--enable-blink-features=CorsRFC1918",
"--enable-features=BlockInsecurePrivateNetworkRequests"]
"bases": ["http/tests/security/cors-rfc1918"],
"args": ["--enable-blink-features=CorsRFC1918"]
},
{
"prefix": "single-renderer-process",
......
This is a testharness.js-based test.
PASS Local non secure page fetches local page.
FAIL Public non secure page fetches local page. assert_equals: expected "failure" but got "success"
Harness: the test ran to completion.
......@@ -3,6 +3,6 @@ Network Enabled
{
initiatorIPAddressSpace : Local
initiatorIsSecureContext : true
privateNetworkRequestPolicy : Allow
privateNetworkRequestPolicy : BlockFromInsecureToMorePrivate
}
......@@ -3,11 +3,11 @@ Two sessions established and Network enabled on both
{
initiatorIPAddressSpace : Local
initiatorIsSecureContext : true
privateNetworkRequestPolicy : Allow
privateNetworkRequestPolicy : BlockFromInsecureToMorePrivate
}
{
initiatorIPAddressSpace : Local
initiatorIsSecureContext : true
privateNetworkRequestPolicy : Allow
privateNetworkRequestPolicy : BlockFromInsecureToMorePrivate
}
This is a testharness.js-based test.
PASS Local non secure page fetches local page.
PASS Public non secure page fetches local page.
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment