diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions')
39 files changed, 779 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset-2.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset-2.html new file mode 100644 index 0000000000..aaa2960aaf --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset-2.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="windows-1250"> +<title>CSS modules: UTF-8 decoding</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script type="module"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/utf-8.css" assert { type: "css"}; + test(() => { + assert_equals(styleSheet.rules[0].style.content, "\"�湿�\""); + }, "CSS module should be loaded as utf-8 even though document's encoding is windows-1250"); +</script> +<script type="module"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/windows-1250.css&ct=text/css%3Bcharset=windows-1250" assert { type: "css"}; + test(() => { + assert_not_equals(styleSheet.rules[0].style.content, "\"�湿�\"", + 'Should be decoded as UTF-8'); + }, "CSS module should be loaded as utf-8 even if it is encoded in windows-1250 and served with a windows-1250 charset response header, and this document's encoding is windows-1250"); +</script>
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset-bom.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset-bom.html new file mode 100644 index 0000000000..e26ee08d31 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset-bom.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>CSS Module scripts should ignore BOMs and always use UTF-8</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script type="module"> + import utf8BOMSheet from './resources/bom-utf-8.css' assert { type: 'css' }; + test(function() { + assert_equals(utf8BOMSheet.rules[0].selectorText, 'div', 'No UTF-8 BOM expected in selector'); + }, 'UTF-8 BOM should be stripped when decoding JSON module script'); + + import utf16BEBOMSheet from './resources/bom-utf-16be.css' assert { type: 'css' }; + test(function() { + assert_equals(utf16BEBOMSheet.rules[0].selectorText, '\ufffd\ufffd\ufffdd\ufffdi\ufffdv\ufffd \ufffd', 'Expected UTF-8 decoded selectorText with 0xfffd replacement characters'); + }, 'UTF-16BE BOM should be ignored, so CSS module should be UTF-8 decoded'); + + import utf16LEBOMSheet from './resources/bom-utf-16le.css' assert { type: 'css' }; + test(function() { + assert_equals(utf16LEBOMSheet.rules[0].selectorText, '\ufffd\ufffdd\ufffdi\ufffdv\ufffd \ufffd', 'Expected UTF-8 decoded selectorText with 0xfffd replacement characters'); + }, 'UTF-16LE BOM should be ignored, so CSS module should be UTF-8 decoded'); +</script>
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset.html new file mode 100644 index 0000000000..2127ec7280 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/charset.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>CSS modules: UTF-8 decoding</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script type="module" onerror="unreachable()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/utf-8.css&ct=text/css%3Bcharset=utf-8" assert { type: "css"}; + test(() => { + assert_equals(styleSheet.rules[0].style.content, "\"śćążź\""); + }, "CSS module should be loaded as utf-8 when charset=utf8 is specified"); +</script> +<script type="module" onerror="unreachable()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/utf-8.css&ct=text/css%3Bcharset=shift-jis" assert { type: "css"}; + test(() => { + assert_equals(styleSheet.rules[0].style.content, "\"śćążź\""); + }, "CSS module should be loaded as utf-8 when charset=shift-jis is specified"); +</script> +<script type="module" onerror="unreachable()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/utf-8.css&ct=text/css%3Bcharset=windows-1252" assert { type: "css"}; + test(() => { + assert_equals(styleSheet.rules[0].style.content, "\"śćążź\""); + }, "CSS module should be loaded as utf-8 when charset=windows-1252 is specified"); +</script> +<script type="module" onerror="unreachable()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/utf-8.css&ct=text/css%3Bcharset=utf-7" assert { type: "css"};; + test(() => { + assert_equals(styleSheet.rules[0].style.content, "\"śćążź\""); + }, "CSS module should be loaded as utf-8 when charset=utf-7 is specified"); +</script> +<script type="module" onerror="unreachable()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/windows-1250.css&ct=text/css%3Bcharset=windows-1250" assert { type: "css"}; + test(() => { + assert_not_equals(styleSheet.rules[0].style.content, "\"śćążź\"", + 'Should be decoded as UTF-8'); + }, "CSS module should be loaded as utf-8 even if it is encoded in windows-1250 and served with a windows-1250 charset response header"); +</script>
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/content-type-checking.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/content-type-checking.html new file mode 100644 index 0000000000..3ade863305 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/content-type-checking.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>CSS modules: Content-Type</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script> +function check(t, styleSheet) { + t.step(() => { + assert_equals(styleSheet.rules[0].cssText, "#test { background-color: rgb(255, 0, 0); }"); + t.done(); + }); +} +const t1 = async_test("text/css"); +const t2 = async_test("application/css"); +const t3 = async_test("text/html+css"); +const t4 = async_test("text/css;boundary=something"); +const t5 = async_test("text/css;foo=bar"); +</script> +<script type="module" onerror="t1.unreached_func()()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/basic.css&ct=text/css" assert { type: "css"}; + check(t1, styleSheet); +</script> +<script type="module" onerror="t2.step_func_done()()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/basic.css&ct=application/css" assert { type: "css"}; + t2.unreached_func("Should not have loaded with MIME type application/css")(); +</script> +<script type="module" onerror="t3.step_func_done()()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/basic.css&ct=text/html+css" assert { type: "css"}; + t3.unreached_func("Should not have loaded with MIME type text/html+css")(); +</script> +<script type="module" onerror="t4.unreached_func()()"> + import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/basic.css&ct=text/css;boundary=something" assert { type: "css"}; + check(t4, styleSheet); +</script> +<script type="module" onerror="t5.unreached_func()()"> +import styleSheet from "../serve-with-content-type.py?fn=css-module-assertions/resources/basic.css&ct=text/css;foo=bar" assert { type: "css"}; +check(t5, styleSheet); +</script>
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/cors-crossorigin-requests.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/cors-crossorigin-requests.html new file mode 100644 index 0000000000..b9de562b72 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/cors-crossorigin-requests.html @@ -0,0 +1,33 @@ +<!doctype html> +<html> +<head> + <title>css-module-assertions-crossorigin</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <h1>css-module-assertions-crossorigin</h1> + <iframe id="import-WithCORS" src="resources/crossorigin-import-with-cors.sub.html"></iframe> + <iframe id="import-NoCORS" src="resources/crossorigin-import-without-cors.sub.html"></iframe> + <iframe id="import-parseerror-WithCors" src="resources/crossorigin-import-parse-error-with-cors.sub.html"></iframe> + <script> + + var tests = [ + { "obj": async_test("Imported CSS module, cross-origin with CORS"), "id": "import-WithCORS", "expected": "imported CSS: #test { background-color: rgb(255, 0, 0); }" }, + { "obj": async_test("Imported CSS module, cross-origin, missing CORS ACAO header"), "id": "import-NoCORS", "expected": "error" }, + { "obj": async_test("Imported CSS module with parse error, cross-origin, with CORS"), "id": "import-parseerror-WithCors", "expected": "imported CSS rules count: 0" }, + ]; + + window.addEventListener("load", function () { + tests.forEach(function (test) { + var target = document.getElementById(test.id); + test.obj.step(function () { + assert_equals(target.contentDocument._log, test.expected, "Unexpected _log value"); + }); + test.obj.done(); + }); + }); + + </script> +</body> +</html> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/credentials.sub.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/credentials.sub.html new file mode 100644 index 0000000000..8c2f0f8073 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/credentials.sub.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +document.cookie = 'milk=1'; + +const setCookiePromise = fetch( + 'http://{{domains[www2]}}:{{ports[http][0]}}/cookies/resources/set-cookie.py?name=milk&path=/html/semantics/scripting-1/the-script-element/css-module-assertions/', + { + mode: 'no-cors', + credentials: 'include', + }); + +const windowLoadPromise = new Promise(resolve => { + window.addEventListener('load', () => { + resolve(); + }); +}); + +promise_test(t => { + const iframe = document.createElement('iframe'); + + return Promise.all([setCookiePromise, windowLoadPromise]).then(() => { + const messagePromise = new Promise(resolve => { + window.addEventListener('message', event => { + resolve(); + }); + }); + + iframe.src = 'resources/credentials-iframe.sub.html'; + document.body.appendChild(iframe); + + return messagePromise; + }).then(() => { + const w = iframe.contentWindow; + + assert_equals(w.sameOriginNoneDescendant, true, + 'Descendant CSS modules should be loaded with the credentials when the crossOrigin attribute is not specified and the target is same-origin'); + assert_equals(w.sameOriginAnonymousDescendant, true, + 'Descendant CSS modules should be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is same-origin'); + assert_equals(w.sameOriginUseCredentialsDescendant, true, + 'Descendant CSS modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is same-origin'); + assert_equals(w.crossOriginNoneDescendant, false, + 'Descendant CSS modules should not be loaded with the credentials when the crossOrigin attribute is not specified and the target is cross-origin'); + assert_equals(w.crossOriginAnonymousDescendant, false, + 'Descendant CSS modules should not be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin'); + assert_equals(w.crossOriginUseCredentialsDescendant, true, + 'Descendant CSS modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is cross-origin'); +}); +}, 'CSS Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute'); +</script> +<body> +</body> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/css-module-worker-test.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/css-module-worker-test.html new file mode 100644 index 0000000000..7ff672da6a --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/css-module-worker-test.html @@ -0,0 +1,54 @@ +<!doctype html> + +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/utils.js"></script> +</head> + +<body> + <script> + setup({allow_uncaught_exception: true}); + promise_test(function (test) { + const uuid = token(); + const worker = new Worker(`./resources/worker.sub.js?key=${uuid}`, { + type: "module" + }); + return new Promise((resolve, reject) => { + worker.addEventListener("error", resolve); + worker.addEventListener("message", reject); + }).then(async () => { + const fetchResponse = await fetch(`./resources/record-fetch.py?key=${uuid}&action=getCount`); + const fetchData = await fetchResponse.json(); + assert_equals(fetchData.count, 0, "Shouldn't have tried fetching CSS module in worker"); + }); + }, "A static import CSS Module within a web worker should not load and should not attempt to fetch the module."); + + promise_test(function (test) { + const uuid = token(); + const worker = new Worker(`./resources/worker-dynamic-import.sub.js?key=${uuid}`, { + type: "module" + }); + + return new Promise(resolve => { + worker.addEventListener("message", resolve); + }).then(async (event) => { + assert_equals(event.data, "NOT LOADED"); + const fetchResponse = await fetch(`./resources/record-fetch.py?key=${uuid}&action=getCount`); + const fetchData = await fetchResponse.json(); + assert_equals(fetchData.count, 0, "Shouldn't have tried fetching CSS module in worker"); + }); + }, "A dynamic import CSS Module within a web worker should not load and should not attempt to fetch the module."); + + promise_test(function (test) { + const worker = new Worker("./resources/basic.css", { + type: "module" + }); + return new Promise(resolve => { + worker.onerror = resolve; + }); + }, "An attempt to load a CSS module as a worker should fail."); + + </script> + +</body>
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/import-css-module-basic.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/import-css-module-basic.html new file mode 100644 index 0000000000..4ea1790aab --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/import-css-module-basic.html @@ -0,0 +1,83 @@ +<!doctype html> +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <div id="test">I am a test div.</div> + <div id="test2">I am a test div.</div> + <div id="test3">I am a test div.</div> + <div id="test3b">I am a test div.</div> + <div id="test4">I am a test div.</div> + <div id="test4b">I am a test div.</div> + <script> + window.errorCount = 0; + window.onerror = (errorMsg, url, lineNumber, column, errorObj) => { + window.errorCount++; + }; + </script> + <script type="module" onerror="unreachable()"> + import sheet from "./resources/basic.css" assert { type: "css" }; + test(() => { + document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; + assert_equals(getComputedStyle(document.querySelector('#test')) + .backgroundColor, "rgb(255, 0, 0)", "CSS module import should succeed"); + }, "A CSS Module should load"); + </script> + <script type="module" onerror="unreachable()"> + import sheet from "./resources/basic-large.css" assert { type: "css" }; + test(() => { + // This tests potential streaming compilation of modules in + // Chromium that is triggered only for large (32>KiB) files in older + // versions. + document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; + assert_equals(getComputedStyle(document.querySelector('#test2')) + .backgroundColor, "rgb(255, 0, 0)", + "CSS module import should succeed"); + }, "A large CSS Module should load"); + </script> + <script type="module" onerror="unreachable()"> + import sheet from "./resources/bad-import.css" assert { type: "css" }; + test(() => { + document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; + assert_equals(window.errorCount, 0); + assert_equals(sheet.cssRules.length, 1, "Parser should skip @import rule"); + assert_equals(getComputedStyle(document.querySelector('#test3b')) + .backgroundColor, "rgba(0, 0, 0, 0)", + "CSS module @import should not succeed"); + assert_equals(getComputedStyle(document.querySelector('#test3')) + .backgroundColor, "rgb(0, 255, 0)", + "Rule after @import should still be applied"); + }, "An @import CSS Module should not load, but should not throw an exception"); + </script> + <script type="module" onerror="unreachable()"> + import sheet from "./resources/malformed.css" assert { type: "css" }; + test(() => { + document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; + assert_equals(window.errorCount, 0); + assert_equals(sheet.cssRules.length, 1, "Import of malformed CSS should succeed and rules after the parse error should still be parsed"); + assert_equals(getComputedStyle(document.querySelector('#test4')) + .backgroundColor, "rgba(0, 0, 0, 0)", + "Malformed CSS rule should not be applied"); + assert_equals(getComputedStyle(document.querySelector('#test4b')) + .backgroundColor, "rgb(0, 255, 0)", + "Parsing should recover and rules after malformed rules should be applied"); + }, "A parse error should not prevent subsequent rules from being included in a CSS module"); + </script> + <script type="module"> + promise_test(function (test) { + const iframe = document.createElement("iframe"); + iframe.src = "resources/css-module-without-assertion-iframe.html"; + return new Promise(resolve => { + iframe.onload = resolve; + document.body.appendChild(iframe); + }).then(event => { + assert_equals(iframe.contentDocument.window_onerror, undefined); + assert_equals(iframe.contentDocument.script_onerror.type, "error"); + assert_equals(getComputedStyle(iframe.contentDocument.querySelector('#test')) + .backgroundColor, "rgba(0, 0, 0, 0)", + "CSS module without type assertion should result in a fetch error"); + }); + }, "CSS module without type assertion should result in a fetch error"); + </script> +</body> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/import-css-module-dynamic.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/import-css-module-dynamic.html new file mode 100644 index 0000000000..13967858cb --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/import-css-module-dynamic.html @@ -0,0 +1,23 @@ +<!doctype html> + +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <script> + promise_test(async function (test) { + const css_module = await import("./resources/basic.css", { assert: { type: "css" }}); + assert_true(css_module.default instanceof CSSStyleSheet); + assert_equals(css_module.default.cssRules[0].cssText, + "#test { background-color: rgb(255, 0, 0); }"); + }, "Load a CSS module with dynamic import()"); + + promise_test(function (test) { + return promise_rejects_js(test, TypeError, + import("./resources/basic.css"), + "Attempting to import() a CSS module without a type assertion should fail"); + }, "Ensure that loading a CSS module with dymnamic import() fails without a type assertion"); + </script> +</body> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/integrity.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/integrity.html new file mode 100644 index 0000000000..1dd0dad470 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/integrity.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title><script> integrity="" with CSS modules</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +window.matchesLog = []; +window.matchesEvents = []; + +window.mismatchesLog = []; +window.mismatchesEvents = []; +</script> +<script type="module" src="resources/integrity-matches.js" integrity="sha384-xvbfmg9iJFHqmCoOS4VNMCwnFPPxEoIlW1Ojzl+fgEd+Wf8Pyez+SMWue+KNovjA" onload="window.matchesEvents.push('load');" onerror="window.matchesEvents.push('error')"></script> +<script type="module" src="resources/integrity-mismatches.js" integrity="sha384-doesnotmatch" onload="window.mismatchesEvents.push('load');" onerror="window.mismatchesEvents.push('error')"></script> + +<script type="module"> +test(() => { + assert_array_equals(window.matchesLog, ["integrity-matches,css:#test { background-color: rgb(255, 0, 0); }"], "The module and its dependency must have executed"); + assert_array_equals(window.matchesEvents, ["load"], "The load event must have fired"); +}, "The integrity attribute must be verified on the top-level of a module loading a CSS module and allow it to execute when it matches"); + +test(() => { + assert_array_equals(window.mismatchesLog, [], "The module and its dependency must not have executed"); + assert_array_equals(window.mismatchesEvents, ["error"], "The error event must have fired"); +}, "The integrity attribute must be verified on the top-level of a module loading a CSS module and not allow it to execute when there's a mismatch"); +</script> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/load-error-events.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/load-error-events.html new file mode 100644 index 0000000000..3457452c93 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/load-error-events.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<head> +<title>load/error events for CSS modules</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../resources/load-error-events-helpers.js"></script> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> +</head> +<script> + "use strict"; + + var test1_load = event_test('inline, 200, parser-inserted', false, false); + var test1_error = event_test('inline, 404, parser-inserted', false, true); + + var test2_load = event_test('src, 200, parser-inserted', true, false); + var test2_error = event_test('src, 404, parser-inserted', false, true); + + var test3_dynamic_load = event_test('src, 200, not parser-inserted', true, false); + var test3_dynamic_error = event_test('src, 404, not parser-inserted', false, true); + + var test4_dynamic_load = event_test('inline, 200, not parser-inserted', false, false); + var test4_dynamic_error = event_test('inline, 404, not parser-inserted', false, true); + + var script3_dynamic_load = document.createElement('script'); + script3_dynamic_load.setAttribute('type', 'module'); + script3_dynamic_load.onload = () => onLoad(test3_dynamic_load); + script3_dynamic_load.onerror = () => onError(test3_dynamic_load); + script3_dynamic_load.src = "./resources/load-error-events.py?test=test3_dynamic_load"; + document.head.appendChild(script3_dynamic_load); + + var script3_dynamic_error = document.createElement('script'); + script3_dynamic_error.setAttribute('type', 'module'); + script3_dynamic_error.onload = () => onLoad(test3_dynamic_error); + script3_dynamic_error.onerror = () => onError(test3_dynamic_error); + script3_dynamic_error.src = "./resources/load-error-events.py?test=test3_dynamic_error"; + document.head.appendChild(script3_dynamic_error); + + var script4_dynamic_load = document.createElement('script'); + script4_dynamic_load.setAttribute('type', 'module'); + script4_dynamic_load.onload = () => onLoad(test4_dynamic_load); + script4_dynamic_load.onerror = () => onError(test4_dynamic_load); + script4_dynamic_load.async = true; + script4_dynamic_load.appendChild(document.createTextNode(` + import "./resources/basic.css" assert { type: "css" }; + onExecute(test4_dynamic_load);` + )); + document.head.appendChild(script4_dynamic_load); + + var script4_dynamic_error = document.createElement('script'); + script4_dynamic_error.setAttribute('type', 'module'); + script4_dynamic_error.onload = () => onLoad(test4_dynamic_error); + script4_dynamic_error.onerror = () => onError(test4_dynamic_error); + script4_dynamic_error.async = true; + script4_dynamic_error.appendChild(document.createTextNode(`import "./not_found.css" assert { type: "css" };`)); + document.head.appendChild(script4_dynamic_error); +</script> +<script onload="onLoad(test1_load);" onerror="onError(test1_load);" type="module"> + import "./resources/basic.css" assert { type: "css"}; + onExecute(test1_load); +</script> +<script onload="onLoad(test1_error);" onerror="onError(test1_error);" type="module"> + import "./not_found.css" assert { type: "css"}; + onExecute(test1_error); +</script> +<script src="./resources/load-error-events.py?test=test2_load" onload="onLoad(test2_load);" onerror="onError(test2_load);" type="module"></script> +<script src="./resources/load-error-events.py?test=test2_error" onload="onLoad(test2_error);" onerror="onError(test2_error);" type="module"></script>
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/referrer-policies.sub.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/referrer-policies.sub.html new file mode 100644 index 0000000000..f078437e09 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/referrer-policies.sub.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html> +<head> +<title>Referrers with CSS module requests</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +</head> +<body> +<script type="module"> + // "name" parameter is necessary for bypassing the module map. + import referrerSame from "./resources/referrer-checker.py?name=sameNoReferrerPolicy" assert { type: "css"}; + import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/referrer-checker.py?name=remoteNoReferrerPolicy" assert { type: "css"}; + + const origin = (new URL(location.href)).origin + "/"; + const originUrl = location.href; + + test(t => { + assert_equals( + referrerSame.rules[0].style.content, '"' + originUrl + '"', + "Referrer URL should be sent for the same-origin top-level script."); + }, "Importing a same-origin top-level script with the default referrer policy."); + + test(t => { + assert_equals( + referrerRemote.rules[0].style.content, '"' + origin + '"', + "Referrer origin should be sent for the remote-origin top-level script."); + }, "Importing a remote-origin top-level script with the default referrer policy."); +</script> +<script type="module" referrerpolicy="origin"> + import referrerSame from "./resources/referrer-checker.py?name=sameReferrerPolicyOrigin" assert { type: "css"}; + import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/referrer-checker.py?name=remoteReferrerPolicyOrigin" assert { type: "css"}; + + const origin = (new URL(location.href)).origin + "/"; + + test(t => { + assert_equals( + referrerSame.rules[0].style.content, '"' + origin + '"', + "Referrer origin should be sent for the same-origin top-level script."); + }, "Importing a same-origin top-level script with the origin policy."); + + test(t => { + assert_equals( + referrerRemote.rules[0].style.content, '"' + origin + '"', + "Referrer origin should be sent for the remote-origin top-level script."); + }, "Importing a remote-origin top-level script with the origin policy."); + +</script> +<script type="module" referrerpolicy="no-referrer"> + import referrerSame from "./resources/referrer-checker.py?name=sameReferrerPolicyNoReferrer" assert { type: "css"}; + import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/referrer-checker.py?name=remoteReferrerPolicyNoReferrer" assert { type: "css"}; + + test(t => { + assert_equals( + referrerSame.rules[0].style.content, '""', + "No referrer should be sent for the same-origin top-level script."); + }, "Importing a same-origin top-level script with the no-referrer policy."); + + test(t => { + assert_equals( + referrerRemote.rules[0].style.content, '""', + "No referrer should be sent for the remote-origin top-level script."); + }, "Importing a remote-origin top-level script with the no-referrer policy."); + +</script> +<script type="module" referrerpolicy="unsafe-url"> + import referrerSame from "./resources/referrer-checker.py?name=sameNoReferrerPolicyUnsafeUrl" assert { type: "css"}; + import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/referrer-checker.py?name=remoteNoReferrerPolicyUnsafeUrl" assert { type: "css"}; + + const originUrl = location.href; + + test(t => { + assert_equals( + referrerSame.rules[0].style.content, '"' + originUrl + '"', + "Referrer URL should be sent for the same-origin top-level script."); + }, "Importing a same-origin top-level script with the unsafe-url referrer policy."); + + test(t => { + assert_equals( + referrerRemote.rules[0].style.content, '"' + originUrl + '"', + "Referrer URL should be sent for the remote-origin top-level script."); + }, "Importing a remote-origin top-level script with the unsafe-url referrer policy."); +</script> +</body> +</html> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/relative-urls.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/relative-urls.html new file mode 100644 index 0000000000..22971d28d9 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/relative-urls.html @@ -0,0 +1,18 @@ +<!doctype html> +<head> + <title>Test resolution of relative URL in CSS module</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <div id="target"></div> + <script type="module"> + import styleSheet from "./resources/load-relative-url.css" assert { type: "css"}; + test(() => { + const target = document.querySelector("#target"); + document.adoptedStyleSheets = [ styleSheet ]; + let backgroundStyle = window.getComputedStyle(target).background; + assert_not_equals(backgroundStyle.indexOf("css-module-assertions/resources/image.png"), -1); + }, "A relative URL in a CSS module should be resolved relative to the CSS file's URL, not the importing document's URL"); + </script> +</body> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/atImported.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/atImported.css new file mode 100644 index 0000000000..8629a846d1 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/atImported.css @@ -0,0 +1,3 @@ +#test3b { + background-color: #FF0000; +}
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bad-import.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bad-import.css new file mode 100644 index 0000000000..a6e1a0f395 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bad-import.css @@ -0,0 +1,4 @@ +@import "atImported.css"; +#test3 { + background-color:#00FF00; +}
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/basic-large.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/basic-large.css new file mode 100644 index 0000000000..555ab70d2e --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/basic-large.css @@ -0,0 +1,7 @@ +#test2 { + background-color:red; +} + +#test:before { + content: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; +} diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/basic.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/basic.css new file mode 100644 index 0000000000..e034ed9ac7 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/basic.css @@ -0,0 +1,3 @@ +#test { + background-color: #FF0000; +}
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-16be.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-16be.css Binary files differnew file mode 100644 index 0000000000..9e17902a1d --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-16be.css diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-16le.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-16le.css Binary files differnew file mode 100644 index 0000000000..ef90843d8e --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-16le.css diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-8.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-8.css new file mode 100644 index 0000000000..5cf81232b7 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/bom-utf-8.css @@ -0,0 +1 @@ +div { background-color: blue; }
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/credentials-iframe.sub.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/credentials-iframe.sub.html new file mode 100644 index 0000000000..cf1d621ce3 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/credentials-iframe.sub.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<meta charset="utf-8"> + +<script type="module"> + import styleSheet from "./cross-origin.py?id=sameOriginNoneDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; + window.sameOriginNoneDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); +</script> +<script type="module" crossOrigin="anonymous"> + import styleSheet from "./cross-origin.py?id=sameOriginAnonymousDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; + window.sameOriginAnonymousDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); +</script> +<script type="module" crossOrigin="use-credentials"> + import styleSheet from "./cross-origin.py?id=sameOriginUseCredentialsDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; + window.sameOriginUseCredentialsDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); +</script> +<script type="module"> + import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/cross-origin.py?id=crossOriginNoneDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; + window.crossOriginNoneDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); +</script> +<script type="module" crossOrigin="anonymous"> + import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/cross-origin.py?id=crossOriginAnonymousDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; + window.crossOriginAnonymousDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); +</script> +<script type="module" crossOrigin="use-credentials"> + import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/cross-origin.py?id=crossOriginUseCredentialsDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; + window.crossOriginUseCredentialsDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); +</script> + +<script type="text/javascript"> +window.addEventListener('load', event => { + window.parent.postMessage({}, '*'); +}); +</script> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/cross-origin.py b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/cross-origin.py new file mode 100644 index 0000000000..d744fc9514 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/cross-origin.py @@ -0,0 +1,17 @@ +def main(request, response): + + headers = [ + (b"Content-Type", b"text/css"), + (b"Access-Control-Allow-Origin", request.GET.first(b"origin")), + (b"Access-Control-Allow-Credentials", b"true") + ] + + milk = request.cookies.first(b"milk", None) + + # Send back + if milk is None: + return headers, u'.requestDidNotHaveCookies { }' + elif milk.value == b"1": + return headers, u'.requestHadCookies { }' + + return headers, u'.requestDidNotHaveCookies { }' diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-parse-error-with-cors.sub.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-parse-error-with-cors.sub.html new file mode 100644 index 0000000000..3afb8edeb1 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-parse-error-with-cors.sub.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head> + <title>css-module-assertions-import-cross-domain-parse-error-WithCORS</title> + <script src="../../module/crossorigin-common.js"></script> +</head> +<body> + <h1>css-module-assertions-import-cross-domain-parse-error-WithCORS</h1> + <script type="module" crossorigin> + import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/parse-error.css?pipe=header(Access-Control-Allow-Origin,*)" assert { type: "css" }; + // Push an event to the log indicating that the script was executed. + document._log.push(`imported CSS rules count: ${styleSheet.rules.length}`); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-with-cors.sub.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-with-cors.sub.html new file mode 100644 index 0000000000..f8754c2a56 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-with-cors.sub.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head> + <title>css-module-assertions-import-cross-domain-WithCORS</title> + <script src="../../module/crossorigin-common.js"></script> +</head> +<body> + <h1>css-module-assertions-import-cross-domain-WithCORS</h1> + <script type="module" crossorigin> + import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/basic.css?pipe=header(Access-Control-Allow-Origin,*)" assert { type: "css" }; + // Push an event to the log indicating that the script was executed. + document._log.push(`imported CSS: ${styleSheet.rules[0].cssText}`); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-without-cors.sub.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-without-cors.sub.html new file mode 100644 index 0000000000..ab70b73573 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/crossorigin-import-without-cors.sub.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head> + <title>css-module-assertions-import-cross-domain-NoCORS</title> + <script src="../../module/crossorigin-common.js"></script> +</head> +<body> + <h1>css-module-assertions-import-cross-domain-NoCORS</h1> + <script type="module" onerror="document._log.push('error');"> + import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/basic.css" assert { type: "css" }; + // Push an event to the log indicating that the script was executed. + document._log.push(`imported CSS: ${styleSheet.rules[0].cssText}`); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/css-module-without-assertion-iframe.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/css-module-without-assertion-iframe.html new file mode 100644 index 0000000000..3d1be841ce --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/css-module-without-assertion-iframe.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<body> + <script> + window.onerror = function (errorMsg, url, lineNumber, column, errorObj) + { + document.window_onerror = errorObj.name; + return true; + }; + + function scriptErrorHandler(e) { + document.script_onerror = e; + } + </script> + <script type="module" onerror="scriptErrorHandler(event)"> + import v from "./basic.css"; + document.adoptedStyleSheets = [v]; + </script> + + <div id="test"> + I am a test div. + </div> +</body>
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/integrity-matches.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/integrity-matches.js new file mode 100644 index 0000000000..95be445311 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/integrity-matches.js @@ -0,0 +1,2 @@ +import styleSheet from "./basic.css" assert { type: "css" }; +window.matchesLog.push(`integrity-matches,css:${styleSheet.cssRules[0].cssText}`); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/integrity-mismatches.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/integrity-mismatches.js new file mode 100644 index 0000000000..af6fc24de4 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/integrity-mismatches.js @@ -0,0 +1,2 @@ +import styleSheet from "./basic.css" assert { type: "css" }; +window.matchesLog.push(`integrity-mismatches,css:${styleSheet.cssRules[0].cssText}`); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/load-error-events.py b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/load-error-events.py new file mode 100644 index 0000000000..b61b1ca834 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/load-error-events.py @@ -0,0 +1,14 @@ +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 "./basic.css" assert { type: "css"}; %s.executed = true;' % test + else: + content = b'import "./not_found.css" assert { type: "css"}; %s.test.step(function() { assert_unreached("404 script should not be executed"); });' % test + + return status, headers, content diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/load-relative-url.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/load-relative-url.css new file mode 100644 index 0000000000..27f2987610 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/load-relative-url.css @@ -0,0 +1,5 @@ + +#target { + /* image.png doesn't exist, but that's irrelevant to the test. */ + background: url('./image.png'); +} diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/malformed.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/malformed.css new file mode 100644 index 0000000000..28819bfdf5 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/malformed.css @@ -0,0 +1,7 @@ +#test4 } { + background-color: #FF0000; +} + +#test4b { + background-color: #00FF00; +} diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/parse-error.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/parse-error.css new file mode 100644 index 0000000000..2bee3ff996 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/parse-error.css @@ -0,0 +1,2 @@ +div /* Opening bracket skipped intentionally. */ } + diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/record-fetch.py b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/record-fetch.py new file mode 100644 index 0000000000..4928cb4acb --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/record-fetch.py @@ -0,0 +1,20 @@ +def main(request, response): + try: + stash_key = request.GET.first(b"key") + action = request.GET.first(b"action") + + run_count = request.server.stash.take(stash_key) + if not run_count: + run_count = 0 + + if action == b"incCount": + request.server.stash.put(stash_key, run_count + 1) + response.headers.set(b"Content-Type", b"text/css") + response.content = b'#test { background-color: #FF0000; }' + elif action == b"getCount": + response.headers.set(b"Content-Type", b"text/json") + response.content = b'{"count": %d }' % run_count + else: + response.set_error(400, u"Invalid action") + except: + response.set_error(400, u"Not enough parameters") diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/referrer-checker.py b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/referrer-checker.py new file mode 100644 index 0000000000..c1eaed8e46 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/referrer-checker.py @@ -0,0 +1,7 @@ +def main(request, response): + referrer = request.headers.get(b"referer", b"") + response_headers = [(b"Content-Type", b"text/css"), + (b"Access-Control-Allow-Origin", b"*")] + # Put the referrer in a CSS rule that can be read by the importer through CSSOM + return (200, response_headers, + b'.referrer { content: "' + referrer + b'" }') diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/utf-8.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/utf-8.css new file mode 100644 index 0000000000..0a8b46656f --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/utf-8.css @@ -0,0 +1,3 @@ +#test { + content: "śćążź"; +}
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/windows-1250.css b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/windows-1250.css new file mode 100644 index 0000000000..9beac4d618 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/windows-1250.css @@ -0,0 +1,3 @@ +#test { + content: "�湿�"; +} diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/worker-dynamic-import.sub.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/worker-dynamic-import.sub.js new file mode 100644 index 0000000000..791bd7d3f9 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/worker-dynamic-import.sub.js @@ -0,0 +1,3 @@ +import("./record-fetch.py?key={{GET[key]}}&action=incCount", { assert: { type: "css" } }) + .then(() => postMessage("LOADED")) + .catch(e => postMessage("NOT LOADED"));
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/worker.sub.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/worker.sub.js new file mode 100644 index 0000000000..ffee312d21 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/resources/worker.sub.js @@ -0,0 +1,2 @@ +import "./record-fetch.py?key={{GET[key]}}&action=incCount" assert { type: "css" }; +postMessage("Unexpectedly loaded");
\ No newline at end of file diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/script-element-css-src.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/script-element-css-src.html new file mode 100644 index 0000000000..231d02db47 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module-assertions/script-element-css-src.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title><script> with CSS src</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + window.log = []; + + const test_load = async_test( + "Test that <script> doesn't load when the src is CSS."); + window.addEventListener("load", test_load.step_func_done(ev => { + assert_array_equals(log, ["error"]); + })); +</script> +<script type="module" src="./resources/basic.css" onload="t.unreached_func('CSS src should fail to load')" onerror="log.push('error')"></script> |