From 80c9552cdaefd508e954fc6ae418c5e84f01ef51 Mon Sep 17 00:00:00 2001 From: Daniel Clark Date: Thu, 22 Apr 2021 12:06:03 -0700 Subject: [PATCH] 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/html/semantics/scripting-1/the-script-element/json-module/charset.html b/html/semantics/scripting-1/the-script-element/json-module/charset.html new file mode 100644 index 00000000000000..de30de8c2e5d41 --- /dev/null +++ b/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/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js b/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js new file mode 100644 index 00000000000000..969c90c2907cc8 --- /dev/null +++ b/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/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js b/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js new file mode 100644 index 00000000000000..3c88a98dbc5512 --- /dev/null +++ b/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/html/semantics/scripting-1/the-script-element/json-module/integrity.html b/html/semantics/scripting-1/the-script-element/json-module/integrity.html new file mode 100644 index 00000000000000..68a794b9733591 --- /dev/null +++ b/html/semantics/scripting-1/the-script-element/json-module/integrity.html @@ -0,0 +1,28 @@ + + +<script> integrity="" + + + + + + + + + diff --git a/html/semantics/scripting-1/the-script-element/json-module/utf-8.json b/html/semantics/scripting-1/the-script-element/json-module/utf-8.json new file mode 100644 index 00000000000000..088d98235873d4 --- /dev/null +++ b/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/html/semantics/scripting-1/the-script-element/json-module/utf8.json b/html/semantics/scripting-1/the-script-element/json-module/utf8.json deleted file mode 100644 index 7bb9edd2f79e82..00000000000000 --- a/html/semantics/scripting-1/the-script-element/json-module/utf8.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "test": "…" -} diff --git a/html/semantics/scripting-1/the-script-element/json-module/utf8.tentative.html b/html/semantics/scripting-1/the-script-element/json-module/utf8.tentative.html deleted file mode 100644 index 24a6f109e1c586..00000000000000 --- a/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/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative.html b/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative.html index ff5953cb700ef3..75d6b756a40eb1 100644 --- a/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative.html +++ b/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/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json b/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json new file mode 100644 index 00000000000000..490e752ce93c75 --- /dev/null +++ b/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." +}