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 10c5cadfcaadd..0000000000000 --- a/testing/web-platform/tests/fetch/nosniff/parsing-nosniff.html +++ /dev/null @@ -1,28 +0,0 @@ - - -
- diff --git a/testing/web-platform/tests/fetch/nosniff/parsing-nosniff.window.js b/testing/web-platform/tests/fetch/nosniff/parsing-nosniff.window.js new file mode 100644 index 0000000000000..043e659127b2c --- /dev/null +++ b/testing/web-platform/tests/fetch/nosniff/parsing-nosniff.window.js @@ -0,0 +1,24 @@ +promise_test(() => fetch("resources/x-content-type-options.json").then(res => res.json()).then(runTests), "Loading JSONā¦"); + +function runTests(allTestData) { + for (let i = 0; i < allTestData.length; i++) { + const testData = allTestData[i], + input = encodeURIComponent(testData.input); + async_test(t => { + const script = document.createElement("script"); + t.add_cleanup(() => script.remove()); + // A