diff options
Diffstat (limited to 'testing/web-platform/tests/fetch/api/basic/request-referrer.js')
-rw-r--r-- | testing/web-platform/tests/fetch/api/basic/request-referrer.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/testing/web-platform/tests/fetch/api/basic/request-referrer.js b/testing/web-platform/tests/fetch/api/basic/request-referrer.js deleted file mode 100644 index cc5cc8e01..000000000 --- a/testing/web-platform/tests/fetch/api/basic/request-referrer.js +++ /dev/null @@ -1,28 +0,0 @@ -if (this.document === undefined) { - importScripts("/resources/testharness.js"); - importScripts("../resources/utils.js"); -} - -function testReferrer(referrer, expected) { - promise_test(function(test) { - var url = RESOURCES_DIR + "inspect-headers.py?headers=referer" - var req = new Request(url, { referrer: referrer }); - return fetch(req).then(function(resp) { - var actual = resp.headers.get("x-request-referer"); - if (expected) { - assert_equals(actual, expected, "request's referer should be: " + expected); - return; - } - if (actual) { - assert_equals(actual, "", "request's referer should be empty"); - } - }); - }); -} - -testReferrer("about:client", window.location.href); - -var fooURL = new URL("./foo", window.location).href; -testReferrer(fooURL, fooURL); - -done(); |