Bug 1732029 [wpt PR 30806] - Don't do a fetch for attempts to import CSS module scrip...
commit2c6c3c50d9ac400760df62fbd80d7e489d62e608
authorDan Clark <daniec@microsoft.com>
Sat, 2 Oct 2021 11:04:22 +0000 (2 11:04 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sat, 2 Oct 2021 22:26:02 +0000 (2 22:26 +0000)
tree2aa28304d53d73ff29d658d649e93f6c97c6a9b9
parent92ad4cabc9a5373ecfd3b6660f9a77190108ff06
Bug 1732029 [wpt PR 30806] - Don't do a fetch for attempts to import CSS module scripts in workers, a=testonly

Automatic update from web-platform-tests
Don't do a fetch for attempts to import CSS module scripts in workers

For attempts to import CSS module scripts in non-Document contexts,
fail when initially validating specifiers and asserted types, rather
than later when we are about to create the module script.

This avoids an extra pointless fetch.

See corresponding spec change
at https://github.com/whatwg/html/pull/7066/

Change-Id: I7fd64ee47d09e3001cc63d9d828ee3ab225e407e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3161478
Commit-Queue: Dan Clark <daniec@microsoft.com>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923021}

--

wpt-commits: 1b3385871f3621acc91c76b806758f883a6cb82a
wpt-pr: 30806
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module/resources/record-fetch.py [new file with mode: 0644]
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker-dynamic-import.js [deleted file]
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker-dynamic-import.sub.js [new file with mode: 0644]
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker.js [deleted file]
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker.sub.js [new file with mode: 0644]