From 1359e8e4624d10ceb0bf55bcb1cb2903141c6d38 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Mon, 26 Jun 2023 10:48:30 +0200 Subject: Move `tests/wpt/web-platform-tests` to `tests/wpt/tests` --- .../the-script-element/json-module/array.json | 1 - .../json-module/bom-utf-16be.json | Bin 40 -> 0 bytes .../json-module/bom-utf-16le.json | Bin 40 -> 0 bytes .../the-script-element/json-module/bom-utf-8.json | 1 - .../the-script-element/json-module/charset-2.html | 19 ----- .../json-module/charset-bom.any.js | 17 ----- .../the-script-element/json-module/charset.html | 37 --------- .../json-module/cors-crossorigin-requests.html | 33 -------- .../json-module/credentials-iframe.sub.html | 33 -------- .../json-module/credentials.sub.html | 55 -------------- .../the-script-element/json-module/cross-origin.py | 16 ---- ...ossorigin-import-parse-error-with-cors.sub.html | 15 ---- .../crossorigin-import-with-cors.sub.html | 15 ---- .../crossorigin-import-without-cors.sub.html | 15 ---- .../the-script-element/json-module/data.json | 3 - .../the-script-element/json-module/false.json | 1 - .../json-module/integrity-matches.js | 2 - .../json-module/integrity-mismatches.js | 2 - .../the-script-element/json-module/integrity.html | 28 ------- .../json-module/invalid-content-type.any.js | 17 ----- .../json-module-service-worker-test.https.html | 29 ------- .../json-module/load-error-events.html | 67 ---------------- .../json-module/load-error-events.py | 14 ---- .../the-script-element/json-module/module.html | 18 ----- .../the-script-element/json-module/module.json | 3 - .../json-module/non-object.any.js | 14 ---- .../the-script-element/json-module/null.json | 1 - .../json-module/parse-error.html | 21 ------ .../json-module/parse-error.json | 1 - .../json-module/referrer-checker.py | 6 -- .../json-module/referrer-policies.sub.html | 84 --------------------- .../json-module/repeated-imports.any.js | 65 ---------------- .../json-module/script-element-json-src.html | 14 ---- .../json-module/serviceworker-dynamic-import.js | 5 -- .../json-module/serviceworker.js | 1 - .../the-script-element/json-module/string.json | 1 - .../the-script-element/json-module/true.json | 1 - .../the-script-element/json-module/utf-8.json | 4 - .../json-module/valid-content-type.html | 46 ----------- .../json-module/windows-1250.json | 4 - 40 files changed, 709 deletions(-) delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/array.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16be.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16le.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-8.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-2.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-bom.any.js delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cors-crossorigin-requests.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials-iframe.sub.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-parse-error-with-cors.sub.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-with-cors.sub.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-without-cors.sub.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/data.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/false.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/invalid-content-type.any.js delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/json-module-service-worker-test.https.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.py delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/null.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-policies.sub.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.js delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/script-element-json-src.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker-dynamic-import.js delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker.js delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/string.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/true.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html delete mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json (limited to 'tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module') diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/array.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/array.json deleted file mode 100644 index e77e32d3382..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/array.json +++ /dev/null @@ -1 +0,0 @@ -["en", "try"] diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16be.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16be.json deleted file mode 100644 index d22a45a5910..00000000000 Binary files a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16be.json and /dev/null differ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16le.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16le.json deleted file mode 100644 index 4d1aa264a69..00000000000 Binary files a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16le.json and /dev/null differ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-8.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-8.json deleted file mode 100644 index 07ba933e860..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-8.json +++ /dev/null @@ -1 +0,0 @@ -{ "data": "hello" } \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-2.html deleted file mode 100644 index 1bfd3fc00ae..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-2.html +++ /dev/null @@ -1,19 +0,0 @@ - - -JSON modules: UTF-8 decoding - - -
- - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-bom.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-bom.any.js deleted file mode 100644 index d2dbe3e468f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-bom.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker -// META: script=/common/utils.js - -promise_test(async () => { - const jsonModule = await import('./bom-utf-8.json', { assert: { type: 'json' } }); - assert_equals(jsonModule.default.data, 'hello'); -}, 'UTF-8 BOM should be stripped when decoding JSON module script'); - -promise_test(async test => { - await promise_rejects_js(test, SyntaxError, - import('./bom-utf-16be.json', { assert: { type: 'json' } }), 'Expected parse error from UTF-16BE BOM'); -}, 'UTF-16BE BOM should result in parse error in JSON module script'); - -promise_test(async test => { - await promise_rejects_js(test, SyntaxError, - import('./bom-utf-16le.json', { assert: { type: 'json' } }), 'Expected parse error from UTF-16LE BOM'); -}, 'UTF-16LE BOM should result in parse error in JSON module script'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset.html deleted file mode 100644 index de30de8c2e5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset.html +++ /dev/null @@ -1,37 +0,0 @@ - - -JSON modules: UTF-8 decoding - - -
- - - - - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cors-crossorigin-requests.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cors-crossorigin-requests.html deleted file mode 100644 index 99ff2f67e80..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cors-crossorigin-requests.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - json-module-crossorigin - - - - -

json-module-crossorigin

- - - - - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials-iframe.sub.html deleted file mode 100644 index dbb9fe6d1a2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials-iframe.sub.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub.html deleted file mode 100644 index a6df506e214..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py deleted file mode 100644 index cd56c3628a0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py +++ /dev/null @@ -1,16 +0,0 @@ -def main(request, response): - - headers = [ - (b"Content-Type", b"application/json"), - (b"Access-Control-Allow-Origin", request.GET.first(b"origin")), - (b"Access-Control-Allow-Credentials", b"true") - ] - - milk = request.cookies.first(b"milk", None) - - if milk is None: - return headers, u'{"requestHadCookies": false}' - elif milk.value == b"1": - return headers, u'{"requestHadCookies": true}' - - return headers, u'{"requestHadCookies": false}' diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-parse-error-with-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-parse-error-with-cors.sub.html deleted file mode 100644 index 12c6a608832..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-parse-error-with-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - json-module-import-cross-domain-parse-error-WithCORS - - - -

json-module-import-cross-domain-parse-error-WithCORS

- - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-with-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-with-cors.sub.html deleted file mode 100644 index 01663d25169..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-with-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - json-module-import-cross-domain-WithCORS - - - -

json-module-import-cross-domain-WithCORS

- - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-without-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-without-cors.sub.html deleted file mode 100644 index 7849c6aeddf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-without-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - json-module-import-cross-domain-NoCORS - - - -

json-module-import-cross-domain-NoCORS

- - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/data.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/data.json deleted file mode 100644 index 14a0526ebb2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/data.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "answer": 42 -} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/false.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/false.json deleted file mode 100644 index c508d5366f7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/false.json +++ /dev/null @@ -1 +0,0 @@ -false diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js deleted file mode 100644 index 969c90c2907..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js +++ /dev/null @@ -1,2 +0,0 @@ -import json from "./data.json" assert { type: "json" }; -window.matchesLog.push(`integrity-matches,json:${json.answer}`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js deleted file mode 100644 index 3c88a98dbc5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js +++ /dev/null @@ -1,2 +0,0 @@ -import json "./data.json" assert { type: "json" }; -window.mismatchesLog.push(`integrity-mismatches,json:${json.answer}`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html deleted file mode 100644 index 68a794b9733..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html +++ /dev/null @@ -1,28 +0,0 @@ - - -<script> integrity="" - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/invalid-content-type.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/invalid-content-type.any.js deleted file mode 100644 index cbccbd48429..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/invalid-content-type.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker - -const content_types = [ - "application/json+protobuf", - "application/json+blah", - "text/x-json", - "text/json+blah", - "application/blahjson", - "image/json", -]; -for (const content_type of content_types) { - promise_test(async test => { - await promise_rejects_js(test, TypeError, - import(`./module.json?pipe=header(Content-Type,${content_type})`, { assert: { type: "json"} }), - `Import of a JSON module with MIME type ${content_type} should fail`); - }, `Try importing JSON module with MIME type ${content_type}`); -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/json-module-service-worker-test.https.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/json-module-service-worker-test.https.html deleted file mode 100644 index cc47da1499f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/json-module-service-worker-test.https.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.html deleted file mode 100644 index a9dfc1e6917..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.html +++ /dev/null @@ -1,67 +0,0 @@ - - - -load/error events for JSON modules - - - - - - - - - - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.py deleted file mode 100644 index 4018adcdf7c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.py +++ /dev/null @@ -1,14 +0,0 @@ -import re - -def main(request, response): - headers = [(b"Content-Type", b"text/javascript")] - test = request.GET.first(b'test') - assert(re.match(b'^[a-zA-Z0-9_]+$', test)) - - status = 200 - if test.find(b'_load') >= 0: - content = b'import "./module.json" assert { type: "json"}; %s.executed = true;' % test - else: - content = b'import "./not_found.json" assert { type: "json"}; %s.test.step(function() { assert_unreached("404 script should not be executed"); });' % test - - return status, headers, content diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.html deleted file mode 100644 index a495d4ac186..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.html +++ /dev/null @@ -1,18 +0,0 @@ - - -JSON modules - - -
- - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.json deleted file mode 100644 index f834b2a4e8f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "test": true -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js deleted file mode 100644 index 37fbcae9fab..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js +++ /dev/null @@ -1,14 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker - -for (const value of [null, true, false, "string"]) { - promise_test(async t => { - const result = await import(`./${value}.json`, { assert: { type: "json" } }); - assert_equals(result.default, value); - }, `Non-object: ${value}`); -} - -promise_test(async t => { - const result = await import("./array.json", { assert: { type: "json" } }); - assert_array_equals(result.default, ["en", "try"]); -}, "Non-object: array"); - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/null.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/null.json deleted file mode 100644 index 19765bd501b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/null.json +++ /dev/null @@ -1 +0,0 @@ -null diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html deleted file mode 100644 index 68d3ef0a9ad..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html +++ /dev/null @@ -1,21 +0,0 @@ - - -JSON modules: parse error - - -
- - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.json deleted file mode 100644 index 98232c64fce..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.json +++ /dev/null @@ -1 +0,0 @@ -{ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py deleted file mode 100644 index e9f0f1789ba..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py +++ /dev/null @@ -1,6 +0,0 @@ -def main(request, response): - referrer = request.headers.get(b"referer", b"") - response_headers = [(b"Content-Type", b"application/json"), - (b"Access-Control-Allow-Origin", b"*")] - return (200, response_headers, - b'{"referrer": "' + referrer + b'"}') diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-policies.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-policies.sub.html deleted file mode 100644 index 83e103529dc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-policies.sub.html +++ /dev/null @@ -1,84 +0,0 @@ - - - -Referrers with JSON module requests - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.js deleted file mode 100644 index 5cc3ee5b7c4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.js +++ /dev/null @@ -1,65 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker -// META: script=/common/utils.js - -promise_test(async test => { - await promise_rejects_js(test, TypeError, - import("./module.json"), - "Dynamic import of a JSON module without a type assertion should fail"); - - // This time the import should succeed because we're using the correct - // import even though the previous attempt with the same specifier failed. - const result = await import("./module.json", { assert: { type: "json" } }); - assert_true(result.default.test); -}, "Importing a specifier that previously failed due to an incorrect type assertion can succeed if the correct assertion is later given"); - -promise_test(async test => { - // Append a URL fragment to the specifier so that this is independent - // from the previous test. - const result = await import("./module.json#2", { assert: { type: "json" } }); - assert_true(result.default.test); - - await promise_rejects_js(test, TypeError, - import("./module.json#2"), - "Dynamic import should fail with the type assertion missing even if the same specifier previously succeeded"); -}, "Importing a specifier that previously succeeded with the correct type assertion should fail if the incorrect assertion is later given"); - -promise_test(async test => { - const uuid_token = token(); - // serve-json-then-js.py gives us JSON the first time - const result_json = await import(`../serve-json-then-js.py?key=${uuid_token}`, { assert: { type: "json" } }); - assert_equals(result_json.default.hello, "world"); - - // Import using the same specifier again; this time we get JS, which - // should succeed since we're not asserting a non-JS type this time. - const result_js = await import(`../serve-json-then-js.py?key=${uuid_token}`); - assert_equals(result_js.default, "hello"); -}, "Two modules of different type with the same specifier can load if the server changes its responses"); - -promise_test(async test => { - const uuid_token = token(); - // serve-json-then-js.py gives us JSON the first time - await promise_rejects_js(test, TypeError, - import(`../serve-json-then-js.py?key=${uuid_token}`), - "Dynamic import of JS with a JSON type assertion should fail"); - - // Import using the same specifier/module type pair again; this time we get JS, - // but the import should still fail because the module map entry for this - // specifier/module type pair already contains a failure. - await promise_rejects_js(test, TypeError, - import(`../serve-json-then-js.py?key=${uuid_token}`), - "import should always fail if the same specifier/type assertion pair failed previously"); -}, "An import should always fail if the same specifier/type assertion pair failed previously"); - -promise_test(async test => { - const uuid_token = token(); - // serve-json-then-js.py gives us JSON the first time - const result_json = await import(`../serve-json-then-js.py?key=${uuid_token}`, { assert: { type: "json" } }); - assert_equals(result_json.default.hello, "world"); - - // If this were to do another fetch, the import would fail because - // serve-json-then-js.py would give us JS this time. But, the module map - // entry for this specifier/module type pair already exists, so we - // successfully reuse the entry instead of fetching again. - const result_json_2 = await import(`../serve-json-then-js.py?key=${uuid_token}`, { assert: { type: "json" } }); - assert_equals(result_json_2.default.hello, "world"); -}, "If an import previously succeeded for a given specifier/type assertion pair, future uses of that pair should yield the same result"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/script-element-json-src.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/script-element-json-src.html deleted file mode 100644 index c6d7c9a76e8..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/script-element-json-src.html +++ /dev/null @@ -1,14 +0,0 @@ - -<script> with JSON src - - - - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker-dynamic-import.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker-dynamic-import.js deleted file mode 100644 index 9466c6fbe40..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker-dynamic-import.js +++ /dev/null @@ -1,5 +0,0 @@ -onmessage = e => { - e.waitUntil(import("./module.json", { assert: { type: "json" } }) - .then(module => e.source.postMessage("LOADED")) - .catch(error => e.source.postMessage("FAILED"))); - }; \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker.js deleted file mode 100644 index 3f0a4d16640..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker.js +++ /dev/null @@ -1 +0,0 @@ -import './module.json' assert { type: "json" }; \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/string.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/string.json deleted file mode 100644 index ace2d72d9d3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/string.json +++ /dev/null @@ -1 +0,0 @@ -"string" diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/true.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/true.json deleted file mode 100644 index 27ba77ddaf6..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/true.json +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json deleted file mode 100644 index 088d9823587..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "data": "śćążź", - "comment": "The data above are five Polish letters, similar to scazz. It can be read correctly only with utf-8 encoding." -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html deleted file mode 100644 index 89ccc59817d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html +++ /dev/null @@ -1,46 +0,0 @@ - - -JSON modules: Content-Type - - -
- - - - - - - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json deleted file mode 100644 index 490e752ce93..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "data": "�湿�", - "comment": "The data above are five Polish letters, similar to scazz. It can be read correctly only with windows1250 encoding." -} -- cgit v1.2.3