Commit 72fadacf authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Disable mixed content checks for some beacon WPT

We need to disable the feature to test referrer policy.

Bug: 732923
Change-Id: I4fab8a187b9947be05bac52d61391732dccd4a8d
Reviewed-on: https://chromium-review.googlesource.com/959412
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542754}
parent cd63e9e0
This is a testharness.js-based test.
PASS Test referer header https://web-platform.test:8444/beacon/resources/
FAIL Test referer header http://web-platform.test:8001/beacon/resources/ assert_true: SendBeacon Succeeded expected true got false
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Test referer header https://web-platform.test:8444/beacon/resources/
FAIL Test referer header http://web-platform.test:8001/beacon/resources/ assert_true: SendBeacon Succeeded expected true got false
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Test referer header https://web-platform.test:8444/beacon/resources/
FAIL Test referer header http://web-platform.test:8001/beacon/resources/ assert_true: SendBeacon Succeeded expected true got false
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL Test referer header http://web-platform.test:8001/beacon/resources/ assert_true: SendBeacon Succeeded expected true got false
Harness: the test ran to completion.
...@@ -27,12 +27,21 @@ ...@@ -27,12 +27,21 @@
testRunner.setCloseRemainingWindowsWhenComplete(true); testRunner.setCloseRemainingWindowsWhenComplete(true);
testRunner.setDumpJavaScriptDialogs(false); testRunner.setDumpJavaScriptDialogs(false);
// fetch-event-referrer-policy.https.html intentionally loads mixed // Some tests intentionally load mixed content in order to test the
// content in order to test the referrer policy, so // referrer policy, so WebKitAllowRunningInsecureContent must be set
// WebKitAllowRunningInsecureContent must be set to true or else the // to true or else the load would be blocked.
// load would be blocked. const paths = [
if (document.URL.indexOf('service-workers/service-worker/fetch-event-referrer-policy.https.html') >= 0) { 'service-workers/service-worker/fetch-event-referrer-policy.https.html',
'beacon/headers/header-referrer-no-referrer-when-downgrade.https.html',
'beacon/headers/header-referrer-strict-origin-when-cross-origin.https.html',
'beacon/headers/header-referrer-strict-origin.https.html',
'beacon/headers/header-referrer-unsafe-url.https.html',
];
for (const path of paths) {
if (document.URL.endsWith(path)) {
testRunner.overridePreference('WebKitAllowRunningInsecureContent', true); testRunner.overridePreference('WebKitAllowRunningInsecureContent', true);
break;
}
} }
} }
......
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