diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-04 19:41:06 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-04 19:41:06 +0000 |
commit | 914368530ba622ff0117cd34bec058fb0d862155 (patch) | |
tree | 6c29459914d1b01ed27fad039d0b982d1dbc32c3 /testing/web-platform/tests/fetch/nosniff | |
parent | c5ad76a2875ca5c06c5bbff7b2f2e3ff7b3599c3 (diff) | |
download | UXP-914368530ba622ff0117cd34bec058fb0d862155.tar UXP-914368530ba622ff0117cd34bec058fb0d862155.tar.gz UXP-914368530ba622ff0117cd34bec058fb0d862155.tar.lz UXP-914368530ba622ff0117cd34bec058fb0d862155.tar.xz UXP-914368530ba622ff0117cd34bec058fb0d862155.zip |
Issue #439 - Remove web-platform tests from the tree.
This removes a total of 23,936 files we would never use nor have the capacity
to properly maintain or keep up-to-date.
Diffstat (limited to 'testing/web-platform/tests/fetch/nosniff')
17 files changed, 0 insertions, 280 deletions
diff --git a/testing/web-platform/tests/fetch/nosniff/image.html b/testing/web-platform/tests/fetch/nosniff/image.html deleted file mode 100644 index e5869d94e..000000000 --- a/testing/web-platform/tests/fetch/nosniff/image.html +++ /dev/null @@ -1,29 +0,0 @@ -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<div id=log></div> -<script> - var fails = ["", "?type=", "?type=x", "?type=x/x"], - passes = ["?type=image/gif", "?type=image/png", "?type=image/png;blah"] - - fails.forEach(function(urlpart) { - async_test(function(t) { - var img = document.createElement("img") - img.onerror = t.step_func_done(function(){}) - img.onload = t.unreached_func("Unexpected load event") - img.src = "resources/image.py" + urlpart - document.body.appendChild(img) - }, "URL query: " + urlpart) - }) - - passes.forEach(function(urlpart) { - async_test(function(t) { - var img = document.createElement("img") - img.onerror = t.unreached_func("Unexpected error event") - img.onload = t.step_func_done(function(){ - assert_equals(img.width, 96) - }) - img.src = "resources/image.py" + urlpart - document.body.appendChild(img) - }, "URL query: " + urlpart) - }) -</script> diff --git a/testing/web-platform/tests/fetch/nosniff/importscripts.html b/testing/web-platform/tests/fetch/nosniff/importscripts.html deleted file mode 100644 index 920b6bdd4..000000000 --- a/testing/web-platform/tests/fetch/nosniff/importscripts.html +++ /dev/null @@ -1,14 +0,0 @@ -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<div id=log></div> -<script> - async_test(function(t) { - var w = new Worker("importscripts.js") - w.onmessage = t.step_func(function(e) { - if(e.data == "END") - t.done() - else - assert_equals(e.data, "PASS") - }) - }, "Test importScripts()") -</script> diff --git a/testing/web-platform/tests/fetch/nosniff/importscripts.js b/testing/web-platform/tests/fetch/nosniff/importscripts.js deleted file mode 100644 index aeb615487..000000000 --- a/testing/web-platform/tests/fetch/nosniff/importscripts.js +++ /dev/null @@ -1,17 +0,0 @@ -// Testing importScripts() -function log(w) { this.postMessage(w) } -function f() { log("FAIL") } -function p() { log("PASS") } - -["", "?type=", "?type=x", "?type=x/x"].forEach(function(urlpart) { - try { - importScripts("resources/js.py" + urlpart) - } catch(e) { - (e.name == "NetworkError") ? p() : log("FAIL (no NetworkError exception): " + urlpart) - } - -}) -importScripts("resources/js.py?type=text/javascript&outcome=p") -importScripts("resources/js.py?type=text/ecmascript&outcome=p") -importScripts("resources/js.py?type=text/ecmascript;blah&outcome=p") -log("END") diff --git a/testing/web-platform/tests/fetch/nosniff/parsing-nosniff.html b/testing/web-platform/tests/fetch/nosniff/parsing-nosniff.html deleted file mode 100644 index 10c5cadfc..000000000 --- a/testing/web-platform/tests/fetch/nosniff/parsing-nosniff.html +++ /dev/null @@ -1,28 +0,0 @@ -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<div id=log></div> -<script> - var fails = ["first", "uppercase"], - passes = ["last", "quoted", "quoted-single", "no-x"] - - fails.forEach(function(urlpart) { - async_test(function(t) { - var script = document.createElement("script") - script.onerror = t.step_func_done(function(){}) - script.onload = t.unreached_func("Unexpected load event") - script.src = "resources/nosniff-" + urlpart + ".asis" - document.body.appendChild(script) - }, "URL query: " + urlpart) - }) - - passes.forEach(function(urlpart) { - async_test(function(t) { - var script = document.createElement("script") - script.onerror = t.unreached_func("Unexpected error event") - script.onload = t.step_func_done(function(){}) - script.src = "resources/nosniff-" + urlpart + ".asis" - document.body.appendChild(script) - }, "URL query: " + urlpart) - }) - -</script> diff --git a/testing/web-platform/tests/fetch/nosniff/resources/css.py b/testing/web-platform/tests/fetch/nosniff/resources/css.py deleted file mode 100644 index 7c4c63b59..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/css.py +++ /dev/null @@ -1,15 +0,0 @@ -def main(request, response): - outcome = request.GET.first("outcome", "f") - type = request.GET.first("type", None) - - content = "/* nothing to see here */" - - response.add_required_headers = False - response.writer.write_status(200) - response.writer.write_header("x-content-type-options", "nosniff") - response.writer.write_header("content-length", len(content)) - if(type != None): - response.writer.write_header("content-type", type) - response.writer.end_headers() - - response.writer.write(content) diff --git a/testing/web-platform/tests/fetch/nosniff/resources/image.py b/testing/web-platform/tests/fetch/nosniff/resources/image.py deleted file mode 100644 index 8fb05edc6..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/image.py +++ /dev/null @@ -1,16 +0,0 @@ -import os.path - -def main(request, response): - type = request.GET.first("type", None) - - body = open(os.path.join(os.path.dirname(__file__), "../../../images/blue96x96.png"), "rb").read() - - response.add_required_headers = False - response.writer.write_status(200) - response.writer.write_header("x-content-type-options", "nosniff") - response.writer.write_header("content-length", len(body)) - if(type != None): - response.writer.write_header("content-type", type) - response.writer.end_headers() - - response.writer.write(body) diff --git a/testing/web-platform/tests/fetch/nosniff/resources/js.py b/testing/web-platform/tests/fetch/nosniff/resources/js.py deleted file mode 100644 index 0c06d9cd2..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/js.py +++ /dev/null @@ -1,17 +0,0 @@ -def main(request, response): - outcome = request.GET.first("outcome", "f") - type = request.GET.first("type", "Content-Type missing") - - content = "// nothing to see here" - content += "\n" - content += "log('FAIL: " + type + "')" if (outcome == "f") else "p()" - - response.add_required_headers = False - response.writer.write_status(200) - response.writer.write_header("x-content-type-options", "nosniff") - response.writer.write_header("content-length", len(content)) - if(type != "Content-Type missing"): - response.writer.write_header("content-type", type) - response.writer.end_headers() - - response.writer.write(content) diff --git a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-first.asis b/testing/web-platform/tests/fetch/nosniff/resources/nosniff-first.asis deleted file mode 100644 index bccc53eef..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-first.asis +++ /dev/null @@ -1,7 +0,0 @@ -HTTP/1.1 200 YOU HAVE NO POWER HERE -Content-Length: 22 -Content-Type: x/x -X-Content-Type-options: nosniff -X-Content-Type-Options: no - -// nothing to see here diff --git a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-last.asis b/testing/web-platform/tests/fetch/nosniff/resources/nosniff-last.asis deleted file mode 100644 index e3de0733e..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-last.asis +++ /dev/null @@ -1,7 +0,0 @@ -HTTP/1.1 200 YOU HAVE NO POWER HERE -Content-Length: 22 -Content-Type: x/x -X-Content-Type-Options: no -X-Content-Type-options: nosniff - -// nothing to see here diff --git a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-no-x.asis b/testing/web-platform/tests/fetch/nosniff/resources/nosniff-no-x.asis deleted file mode 100644 index 329d0f721..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-no-x.asis +++ /dev/null @@ -1,6 +0,0 @@ -HTTP/1.1 200 YOU HAVE NO POWER HERE -Content-Length: 22 -Content-Type: x/x -Content-Type-Options: nosniff - -// nothing to see here diff --git a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-quoted-single.asis b/testing/web-platform/tests/fetch/nosniff/resources/nosniff-quoted-single.asis deleted file mode 100644 index 501f18999..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-quoted-single.asis +++ /dev/null @@ -1,6 +0,0 @@ -HTTP/1.1 200 YOU HAVE NO POWER HERE -Content-Length: 22 -Content-Type: x/x -X-Content-Type-Options: 'NosniFF' - -// nothing to see here diff --git a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-quoted.asis b/testing/web-platform/tests/fetch/nosniff/resources/nosniff-quoted.asis deleted file mode 100644 index c6de62b68..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-quoted.asis +++ /dev/null @@ -1,6 +0,0 @@ -HTTP/1.1 200 YOU HAVE NO POWER HERE -Content-Length: 22 -Content-Type: x/x -X-Content-Type-Options: "nosniFF" - -// nothing to see here diff --git a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-uppercase.asis b/testing/web-platform/tests/fetch/nosniff/resources/nosniff-uppercase.asis deleted file mode 100644 index 8097fddce..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/nosniff-uppercase.asis +++ /dev/null @@ -1,6 +0,0 @@ -HTTP/1.1 200 YOU HAVE NO POWER HERE -Content-Length: 22 -Content-Type: x/x -X-Content-Type-Options: NOSNIFF - -// nothing to see here diff --git a/testing/web-platform/tests/fetch/nosniff/resources/worker.py b/testing/web-platform/tests/fetch/nosniff/resources/worker.py deleted file mode 100644 index 3903ba349..000000000 --- a/testing/web-platform/tests/fetch/nosniff/resources/worker.py +++ /dev/null @@ -1,16 +0,0 @@ -def main(request, response): - type = request.GET.first("type", None) - - content = "// nothing to see here" - content += "\n" - content += "this.postMessage('hi')" - - response.add_required_headers = False - response.writer.write_status(200) - response.writer.write_header("x-content-type-options", "nosniff") - response.writer.write_header("content-length", len(content)) - if(type != None): - response.writer.write_header("content-type", type) - response.writer.end_headers() - - response.writer.write(content) diff --git a/testing/web-platform/tests/fetch/nosniff/script.html b/testing/web-platform/tests/fetch/nosniff/script.html deleted file mode 100644 index c5c5167f5..000000000 --- a/testing/web-platform/tests/fetch/nosniff/script.html +++ /dev/null @@ -1,32 +0,0 @@ -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<div id=log></div> -<script> - var log = function() {}, // see comment below - p = function() {}, // see comment below - fails = ["", "?type=", "?type=x", "?type=x/x", "?type=text/json"], - passes = ["?type=text/javascript", "?type=text/ecmascript", "?type=text/ecmascript;blah", "?type=text/javascript1.0"] - - // Ideally we'd also check whether the scripts in fact execute, but that would involve - // timers and might get a bit racy without cross-browser support for the execute events. - - fails.forEach(function(urlpart) { - async_test(function(t) { - var script = document.createElement("script") - script.onerror = t.step_func_done(function(){}) - script.onload = t.unreached_func("Unexpected load event") - script.src = "resources/js.py" + urlpart - document.body.appendChild(script) - }, "URL query: " + urlpart) - }) - - passes.forEach(function(urlpart) { - async_test(function(t) { - var script = document.createElement("script") - script.onerror = t.unreached_func("Unexpected error event") - script.onload = t.step_func_done(function(){}) - script.src = "resources/js.py" + urlpart + "&outcome=p" - document.body.appendChild(script) - }, "URL query: " + urlpart) - }) -</script> diff --git a/testing/web-platform/tests/fetch/nosniff/stylesheet.html b/testing/web-platform/tests/fetch/nosniff/stylesheet.html deleted file mode 100644 index 0ad04038e..000000000 --- a/testing/web-platform/tests/fetch/nosniff/stylesheet.html +++ /dev/null @@ -1,30 +0,0 @@ -<!-- quirks mode is important, text/css is already required otherwise --> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<div id=log></div> -<script> - var fails = ["", "?type=", "?type=x", "?type=x/x"], - passes = ["?type=text/css", "?type=text/css;blah"] - - fails.forEach(function(urlpart) { - async_test(function(t) { - var link = document.createElement("link") - link.rel = "stylesheet" - link.onerror = t.step_func_done(function(){}) - link.onload = t.unreached_func("Unexpected load event") - link.href = "resources/css.py" + urlpart - document.body.appendChild(link) - }, "URL query: " + urlpart) - }) - - passes.forEach(function(urlpart) { - async_test(function(t) { - var link = document.createElement("link") - link.rel = "stylesheet" - link.onerror = t.unreached_func("Unexpected error event") - link.onload = t.step_func_done(function(){}) - link.href = "resources/css.py" + urlpart - document.body.appendChild(link) - }, "URL query: " + urlpart) - }) -</script> diff --git a/testing/web-platform/tests/fetch/nosniff/worker.html b/testing/web-platform/tests/fetch/nosniff/worker.html deleted file mode 100644 index 466b2075e..000000000 --- a/testing/web-platform/tests/fetch/nosniff/worker.html +++ /dev/null @@ -1,28 +0,0 @@ -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<div id=log></div> -<script> - var workers = [], - fails = ["", "?type=", "?type=x", "?type=x/x"], - passes = ["?type=text/javascript", "?type=text/ecmascript", "?type=text/ecmascript;yay"] - - fails.forEach(function(urlpart) { - async_test(function(t) { - var w = new Worker("resources/worker.py" + urlpart) - w.onmessage = t.unreached_func("Unexpected message event") - w.onerror = t.step_func_done(function(){}) - workers.push(w) // avoid GC - }, "URL query: " + urlpart) - }) - - passes.forEach(function(urlpart) { - async_test(function(t) { - var w = new Worker("resources/worker.py" + urlpart) - w.onmessage = t.step_func_done(function(e){ - assert_equals(e.data, "hi") - }) - w.onerror = t.unreached_func("Unexpected error event") - workers.push(w) // avoid GC - }, "URL query: " + urlpart) - }) -</script> |