Title: [233273] trunk/LayoutTests/imported/w3c
Revision
233273
Author
[email protected]
Date
2018-06-27 12:59:17 -0700 (Wed, 27 Jun 2018)

Log Message

Add Cross-Origin-Resource-Policy tests for workers and service workers
https://bugs.webkit.org/show_bug.cgi?id=187030

Reviewed by Chris Dumez.

* web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker-expected.txt: Added.
* web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker.html: Added.
* web-platform-tests/fetch/cross-origin-resource-policy/fetch.any-expected.txt: Added.
* web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.html: Added.
* web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html.
* web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker-expected.txt: Added.
* web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker.html: Added.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (233272 => 233273)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-06-27 19:23:13 UTC (rev 233272)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-06-27 19:59:17 UTC (rev 233273)
@@ -1,3 +1,18 @@
+2018-06-27  Youenn Fablet  <[email protected]>
+
+        Add Cross-Origin-Resource-Policy tests for workers and service workers
+        https://bugs.webkit.org/show_bug.cgi?id=187030
+
+        Reviewed by Chris Dumez.
+
+        * web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker-expected.txt: Added.
+        * web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker.html: Added.
+        * web-platform-tests/fetch/cross-origin-resource-policy/fetch.any-expected.txt: Added.
+        * web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.html: Added.
+        * web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html.
+        * web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker-expected.txt: Added.
+        * web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker.html: Added.
+
 2018-06-26  Youenn Fablet  <[email protected]>
 
         Import wpt CORP tests

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker-expected.txt (0 => 233273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker-expected.txt	2018-06-27 19:59:17 UTC (rev 233273)
@@ -0,0 +1,15 @@
+
+PASS fetch.any.js test 
+PASS Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Valid cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a cross-origin redirection. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header. 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker.html (0 => 233273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker.html	2018-06-27 19:59:17 UTC (rev 233273)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<title>Cross-Origin-Resource-Policy in Service Worker</title>
+<script src=""
+<script src=""
+<script src=""
+<script>
+
+service_worker_test(
+    'fetch.any.js',
+    'fetch.any.js test');
+
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any-expected.txt (0 => 233273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any-expected.txt	2018-06-27 19:59:17 UTC (rev 233273)
@@ -0,0 +1,26 @@
+CONSOLE MESSAGE: Cancelled load to http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin due to access control checks.
+CONSOLE MESSAGE: Cancelled load to http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-site because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-site due to access control checks.
+CONSOLE MESSAGE: Cancelled load to https://localhost:9443/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Fetch API cannot load https://localhost:9443/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin due to access control checks.
+CONSOLE MESSAGE: Cancelled load to http://localhost:8801/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8801/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin due to access control checks.
+CONSOLE MESSAGE: Cancelled load to http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to http://localhost:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin denied by Cross-Origin Resource Sharing policy: Cancelled load to http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/redirect.py?corp=same-origin&redirectTo=http%3A%2F%2Flocalhost%3A8800%2Ffetch%2Fcross-origin-resource-policy%2Fresources%2Fhello.py%3Fcorp%3Dsame-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/redirect.py?corp=same-origin&redirectTo=http%3A%2F%2Flocalhost%3A8800%2Ffetch%2Fcross-origin-resource-policy%2Fresources%2Fhello.py%3Fcorp%3Dsame-origin due to access control checks.
+
+PASS Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Valid cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a cross-origin redirection. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header. 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.html (0 => 233273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.html	2018-06-27 19:59:17 UTC (rev 233273)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->

Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.js (from rev 233272, trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html) (0 => 233273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.js	2018-06-27 19:59:17 UTC (rev 233273)
@@ -0,0 +1,80 @@
+// 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 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");
+    assert_equals(await response.text(), "hello");
+}, "Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+promise_test(async () => {
+    const response = await fetch("./resources/hello.py?corp=same-site");
+    assert_equals(await response.text(), "hello");
+}, "Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test(async (test) => {
+    const response = await fetch(notSameSiteBaseURL + "resources/hello.py?corp=same-origin");
+    assert_equals(await response.text(), "hello");
+}, "Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+promise_test(async (test) => {
+    const response = await fetch(notSameSiteBaseURL + "resources/hello.py?corp=same-site");
+    assert_equals(await response.text(), "hello");
+}, "Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test((test) => {
+    const remoteURL = notSameSiteBaseURL + "resources/hello.py?corp=same-origin";
+    return promise_rejects(test, new TypeError, fetch(remoteURL, { mode : "no-cors" }));
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+promise_test((test) => {
+    const remoteURL = notSameSiteBaseURL + "resources/hello.py?corp=same-site";
+    return promise_rejects(test, new TypeError, fetch(remoteURL, { mode: "no-cors" }));
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test((test) => {
+    const remoteURL = httpsBaseURL + "resources/hello.py?corp=same-site";
+    return fetch(remoteURL, { mode: "no-cors" });
+}, "Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test((test) => {
+    const remoteURL = httpsBaseURL + "resources/hello.py?corp=same-origin";
+    return promise_rejects(test, new TypeError, fetch(remoteURL, { mode : "no-cors" }));
+}, "Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+promise_test(async (test) => {
+    const remoteSameSiteURL = sameSiteBaseURL + "resources/hello.py?corp=same-site";
+
+    await fetch(remoteSameSiteURL, { mode: "no-cors" });
+
+    return promise_rejects(test, new TypeError, fetch(sameSiteBaseURL + "resources/hello.py?corp=same-origin", { mode: "no-cors" }));
+}, "Valid cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test((test) => {
+    const finalURL = notSameSiteBaseURL + "resources/hello.py?corp=same-origin";
+    return promise_rejects(test, new TypeError, fetch("resources/redirect.py?redirectTo=" + encodeURIComponent(finalURL), { mode: "no-cors" }));
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection.");
+
+promise_test((test) => {
+    const finalURL = localBaseURL + "resources/hello.py?corp=same-origin";
+    return fetch(notSameSiteBaseURL + "resources/redirect.py?redirectTo=" + encodeURIComponent(finalURL), { mode: "no-cors" });
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a cross-origin redirection.");
+
+promise_test(async (test) => {
+    const finalURL = localBaseURL + "resources/hello.py?corp=same-origin";
+
+    await fetch(finalURL, { mode: "no-cors" });
+
+    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.");

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker-expected.txt (0 => 233273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker-expected.txt	2018-06-27 19:59:17 UTC (rev 233273)
@@ -0,0 +1,20 @@
+CONSOLE MESSAGE: Cancelled load to http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Cancelled load to http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-site because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Cancelled load to https://localhost:9443/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Cancelled load to http://localhost:8801/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Cancelled load to http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+CONSOLE MESSAGE: Cross-origin redirection to http://localhost:8800/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-origin denied by Cross-Origin Resource Sharing policy: Cancelled load to http://127.0.0.1:8800/fetch/cross-origin-resource-policy/resources/redirect.py?corp=same-origin&redirectTo=http%3A%2F%2Flocalhost%3A8800%2Ffetch%2Fcross-origin-resource-policy%2Fresources%2Fhello.py%3Fcorp%3Dsame-origin because it violates the resource's Cross-Origin-Resource-Policy response header.
+
+PASS Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-origin' response header. 
+PASS Valid cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a cross-origin redirection. 
+PASS Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header. 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker.html (0 => 233273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker.html	2018-06-27 19:59:17 UTC (rev 233273)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->

Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html (233272 => 233273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html	2018-06-27 19:23:13 UTC (rev 233272)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html	2018-06-27 19:59:17 UTC (rev 233273)
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <script src=""
-    <script src=""
-    <script src=""
-</head>
-<body>
-    <script>
-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(/\/[^\/]*$/, '/') ;
-
-promise_test(async () => {
-    const response = await fetch("./resources/hello.py?corp=same-origin");
-    assert_equals(await response.text(), "hello");
-}, "Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
-
-promise_test(async () => {
-    const response = await fetch("./resources/hello.py?corp=same-site");
-    assert_equals(await response.text(), "hello");
-}, "Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
-
-promise_test(async (test) => {
-    const response = await fetch(notSameSiteBaseURL + "resources/hello.py?corp=same-origin");
-    assert_equals(await response.text(), "hello");
-}, "Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
-
-promise_test(async (test) => {
-    const response = await fetch(notSameSiteBaseURL + "resources/hello.py?corp=same-site");
-    assert_equals(await response.text(), "hello");
-}, "Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
-
-promise_test((test) => {
-    const remoteURL = notSameSiteBaseURL + "resources/hello.py?corp=same-origin";
-    return promise_rejects(test, new TypeError, fetch(remoteURL, { mode : "no-cors" }));
-}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
-
-promise_test((test) => {
-    const remoteURL = notSameSiteBaseURL + "resources/hello.py?corp=same-site";
-    return promise_rejects(test, new TypeError, fetch(remoteURL, { mode: "no-cors" }));
-}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
-
-promise_test((test) => {
-    const remoteURL = httpsBaseURL + "resources/hello.py?corp=same-site";
-    return fetch(remoteURL, { mode: "no-cors" });
-}, "Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-site' response header.");
-
-promise_test((test) => {
-    const remoteURL = httpsBaseURL + "resources/hello.py?corp=same-origin";
-    return promise_rejects(test, new TypeError, fetch(remoteURL, { mode : "no-cors" }));
-}, "Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
-
-promise_test(async (test) => {
-    const remoteSameSiteURL = sameSiteBaseURL + "resources/hello.py?corp=same-site";
-
-    await fetch(remoteSameSiteURL, { mode: "no-cors" });
-
-    return promise_rejects(test, new TypeError, fetch(sameSiteBaseURL + "resources/hello.py?corp=same-origin", { mode: "no-cors" }));
-}, "Valid cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
-
-promise_test((test) => {
-    const finalURL = notSameSiteBaseURL + "resources/hello.py?corp=same-origin";
-    return promise_rejects(test, new TypeError, fetch("resources/redirect.py?redirectTo=" + encodeURIComponent(finalURL), { mode: "no-cors" }));
-}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection.");
-
-promise_test((test) => {
-    const finalURL = localBaseURL + "resources/hello.py?corp=same-origin";
-    return fetch(notSameSiteBaseURL + "resources/redirect.py?redirectTo=" + encodeURIComponent(finalURL), { mode: "no-cors" });
-}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a cross-origin redirection.");
-
-promise_test(async (test) => {
-    const finalURL = localBaseURL + "resources/hello.py?corp=same-origin";
-
-    await fetch(finalURL, { mode: "no-cors" });
-
-    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>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to