diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index ae800c288cb5..177171d31a46 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -87099,6 +87099,18 @@ {} ] ], + "fetch/api/basic/request-referrer-redirected-worker.html": [ + [ + "/fetch/api/basic/request-referrer-redirected-worker.html", + {} + ] + ], + "fetch/api/basic/request-referrer-worker.html": [ + [ + "/fetch/api/basic/request-referrer-worker.html", + {} + ] + ], "fetch/api/basic/request-referrer.html": [ [ "/fetch/api/basic/request-referrer.html", @@ -163318,12 +163330,20 @@ "6a15c64c072f4e57470ed3f2709e43fa2f806b79", "support" ], + "fetch/api/basic/request-referrer-redirected-worker.html": [ + "41013925a84ab080c9c9f3b16ef4d8fdd1d50588", + "testharness" + ], + "fetch/api/basic/request-referrer-worker.html": [ + "3dad9617d76eed94d8b759d0d27b20c431873dd4", + "testharness" + ], "fetch/api/basic/request-referrer.html": [ "acf1ca37cf3904eccf4c7a9248c49e68f6260866", "testharness" ], "fetch/api/basic/request-referrer.js": [ - "5267f72887c4f7b039d2a5aae3519dc54cceca97", + "03c8ccec8ee4b37994bf38f20ff9fd531a209974", "support" ], "fetch/api/basic/request-upload-worker.html": [ diff --git a/testing/web-platform/tests/fetch/api/basic/request-referrer-redirected-worker.html b/testing/web-platform/tests/fetch/api/basic/request-referrer-redirected-worker.html new file mode 100644 index 000000000000..0306c8770c6d --- /dev/null +++ b/testing/web-platform/tests/fetch/api/basic/request-referrer-redirected-worker.html @@ -0,0 +1,17 @@ + + + + + Fetch in worker: referrer header + + + + + + + diff --git a/testing/web-platform/tests/fetch/api/basic/request-referrer-worker.html b/testing/web-platform/tests/fetch/api/basic/request-referrer-worker.html new file mode 100644 index 000000000000..d598c8bad584 --- /dev/null +++ b/testing/web-platform/tests/fetch/api/basic/request-referrer-worker.html @@ -0,0 +1,14 @@ + + + + + Fetch in worker: referrer header + + + + + + + diff --git a/testing/web-platform/tests/fetch/api/basic/request-referrer.js b/testing/web-platform/tests/fetch/api/basic/request-referrer.js index cc5cc8e01d40..6a55c6179e1b 100644 --- a/testing/web-platform/tests/fetch/api/basic/request-referrer.js +++ b/testing/web-platform/tests/fetch/api/basic/request-referrer.js @@ -3,7 +3,7 @@ if (this.document === undefined) { importScripts("../resources/utils.js"); } -function testReferrer(referrer, expected) { +function testReferrer(referrer, expected, desc) { promise_test(function(test) { var url = RESOURCES_DIR + "inspect-headers.py?headers=referer" var req = new Request(url, { referrer: referrer }); @@ -17,12 +17,12 @@ function testReferrer(referrer, expected) { assert_equals(actual, "", "request's referer should be empty"); } }); - }); + }, desc); } -testReferrer("about:client", window.location.href); +testReferrer("about:client", self.location.href, 'about:client referrer'); -var fooURL = new URL("./foo", window.location).href; -testReferrer(fooURL, fooURL); +var fooURL = new URL("./foo", self.location).href; +testReferrer(fooURL, fooURL, 'url referrer'); done();