From 81e95068f2aabe5defaa6de82b09dd0b4e0f8cf0 Mon Sep 17 00:00:00 2001 From: Daniel Clark Date: Sat, 24 Apr 2021 09:17:49 +0000 Subject: [PATCH] Bug 1706465 [wpt PR 28606] - Add JSON modules tests for charset, integrity, and MIME type parameters, a=testonly Automatic update from web-platform-tests Add JSON modules tests for charset, integrity, and MIME type parameters Add JSON modules tests for the following: - The + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/charset.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/charset.html new file mode 100644 index 0000000000000..de30de8c2e5d4 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/charset.html @@ -0,0 +1,37 @@ + + +JSON modules: UTF-8 decoding + + +
+ + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js new file mode 100644 index 0000000000000..969c90c2907cc --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js @@ -0,0 +1,2 @@ +import json from "./data.json" assert { type: "json" }; +window.matchesLog.push(`integrity-matches,json:${json.answer}`); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js new file mode 100644 index 0000000000000..3c88a98dbc551 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js @@ -0,0 +1,2 @@ +import json "./data.json" assert { type: "json" }; +window.mismatchesLog.push(`integrity-mismatches,json:${json.answer}`); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html new file mode 100644 index 0000000000000..68a794b973359 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html @@ -0,0 +1,28 @@ + + +<script> integrity="" + + + + + + + + + diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json new file mode 100644 index 0000000000000..088d98235873d --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json @@ -0,0 +1,4 @@ +{ + "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/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf8.json b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf8.json deleted file mode 100644 index 7bb9edd2f79e8..0000000000000 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf8.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "test": "…" -} diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf8.tentative.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf8.tentative.html deleted file mode 100644 index 24a6f109e1c58..0000000000000 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/utf8.tentative.html +++ /dev/null @@ -1,36 +0,0 @@ - - -JSON modules: UTF-8 decoding - - -
- - - - - diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative.html index ff5953cb700ef..75d6b756a40eb 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative.html +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative.html @@ -17,6 +17,8 @@ const t2 = async_test("application/json"); const t3 = async_test("text/html+json"); const t4 = async_test("image/svg+json"); +const t5 = async_test("text/json;boundary=something"); +const t6 = async_test("text/json;foo=bar"); + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json new file mode 100644 index 0000000000000..490e752ce93c7 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json @@ -0,0 +1,4 @@ +{ + "data": "�湿�", + "comment": "The data above are five Polish letters, similar to scazz. It can be read correctly only with windows1250 encoding." +}