mirror of
https://github.com/servo/servo.git
synced 2025-08-24 22:58:21 +01:00
Update web-platform-tests to revision 7a6f5673ff5d146ca5c09c6a1b42b7706cfee328
This commit is contained in:
parent
e2fca1b228
commit
4787b28da3
261 changed files with 8195 additions and 4689 deletions
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Cross-Origin-Resource-Policy in Service Worker</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
<script>
|
||||
|
||||
service_worker_test(
|
||||
'fetch.any.js',
|
||||
'fetch.any.js test');
|
||||
|
||||
</script>
|
|
@ -1,17 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// META: script=/common/get-host-info.sub.js
|
||||
// META: script=/resources/testharness.js
|
||||
|
||||
if (!self.document) {
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("/common/get-host-info.sub.js");
|
||||
}
|
||||
|
||||
const host = get_host_info();
|
||||
const localBaseURL = host.HTTP_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
|
||||
const sameSiteBaseURL = "http://" + host.ORIGINAL_HOST + ":" + host.HTTP_PORT2 + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
|
||||
const notSameSiteBaseURL = host.HTTP_NOTSAMESITE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
|
||||
const httpsBaseURL = host.HTTPS_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
|
||||
const path = "/fetch/cross-origin-resource-policy/";
|
||||
const localBaseURL = host.HTTP_ORIGIN + path;
|
||||
const sameSiteBaseURL = "http://" + host.ORIGINAL_HOST + ":" + host.HTTP_PORT2 + path;
|
||||
const notSameSiteBaseURL = host.HTTP_NOTSAMESITE_ORIGIN + path;
|
||||
const httpsBaseURL = host.HTTPS_ORIGIN + path;
|
||||
|
||||
promise_test(async () => {
|
||||
const response = await fetch("./resources/hello.py?corp=same-origin");
|
||||
|
@ -78,6 +78,3 @@ promise_test(async (test) => {
|
|||
|
||||
return promise_rejects(test, new TypeError, fetch(notSameSiteBaseURL + "resources/redirect.py?corp=same-origin&redirectTo=" + encodeURIComponent(finalURL), { mode: "no-cors" }));
|
||||
}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header.");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue