mirror of
https://github.com/servo/servo.git
synced 2025-08-27 16:18:21 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -0,0 +1 @@
|
|||
// empty, but referrer-policy set on this file
|
|
@ -0,0 +1 @@
|
|||
Referrer-Policy: no-referrer
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fetch in service worker: referrer with no-referrer policy</title>
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
|
||||
<meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
service_worker_test("referrer-no-referrer.js?pipe=sub");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fetch in service worker: referrer with no-referrer policy</title>
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
|
||||
<meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
service_worker_test("referrer-origin.js?pipe=sub");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fetch in service worker: referrer with origin-when-cross-origin policy</title>
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
service_worker_test("referrer-origin-when-cross-origin.js?pipe=sub");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,10 +1,14 @@
|
|||
if (this.document === undefined) {
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../resources/utils.js");
|
||||
|
||||
// A nested importScripts() with a referrer-policy should have no effect
|
||||
// on overall worker policy.
|
||||
importScripts("nested-policy.js");
|
||||
}
|
||||
|
||||
var referrerOrigin = "http://{{host}}:{{ports[http][0]}}/";
|
||||
var fetchedUrl = "http://{{host}}:{{ports[http][1]}}" + dirname(location.pathname) + RESOURCES_DIR + "inspect-headers.py?cors&headers=referer";
|
||||
var referrerOrigin = location.origin + '/';
|
||||
var fetchedUrl = "https://{{domains[www]}}:{{ports[https][0]}}" + dirname(location.pathname) + RESOURCES_DIR + "inspect-headers.py?cors&headers=referer";
|
||||
|
||||
promise_test(function(test) {
|
||||
return fetch(fetchedUrl).then(function(resp) {
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
<script src="../resources/utils.js"></script>
|
||||
<script src="referrer-origin.js?pipe=sub"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
if (this.document === undefined) {
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../resources/utils.js");
|
||||
|
||||
// A nested importScripts() with a referrer-policy should have no effect
|
||||
// on overall worker policy.
|
||||
importScripts("nested-policy.js");
|
||||
}
|
||||
|
||||
var referrerOrigin = "http://{{host}}:{{ports[http][0]}}/";
|
||||
var referrerOrigin = (new URL("/", location.href)).href;
|
||||
var fetchedUrl = RESOURCES_DIR + "inspect-headers.py?headers=referer";
|
||||
|
||||
promise_test(function(test) {
|
||||
|
@ -15,7 +19,7 @@ promise_test(function(test) {
|
|||
}, "Request's referrer is origin");
|
||||
|
||||
promise_test(function(test) {
|
||||
var referrerUrl = "http://{{domains[www]}}:{{ports[http][0]}}/";
|
||||
var referrerUrl = "https://{{domains[www]}}:{{ports[https][0]}}/";
|
||||
return fetch(fetchedUrl, { "referrer": referrerUrl }).then(function(resp) {
|
||||
assert_equals(resp.status, 200, "HTTP status is 200");
|
||||
assert_equals(resp.type , "basic", "Response's type is basic");
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fetch in worker: referrer with unsafe-url policy</title>
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
|
||||
<meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
service_worker_test("referrer-unsafe-url.js?pipe=sub");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,10 @@
|
|||
if (this.document === undefined) {
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../resources/utils.js");
|
||||
|
||||
// A nested importScripts() with a referrer-policy should have no effect
|
||||
// on overall worker policy.
|
||||
importScripts("nested-policy.js");
|
||||
}
|
||||
|
||||
var referrerUrl = location.href;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue