-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1592868 [wpt PR 20012] - [SyntheticModules] Implements CSS Module…
…s, a=testonly Automatic update from web-platform-tests [SyntheticModules] Implements CSS Modules This is the final change required for CSS Modules to be utilized by developers. Following the acceptance of this change, if you run chromium with the CSSModules runtime flag, the following is now valid syntax: <script type="module"> import sheet from "./example.css"; </script> CSS Modules Explainer: https://github.com/w3c/webcomponents/blob/gh-pages/proposals/css-modules-v1-explainer.md CSS Modules Spec PR: whatwg/html#4898 Bug: 967018 Change-Id: Ifdee5b92259fb7e4e9c8f9aa88e69a98eb55c551 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1799923 Commit-Queue: Sam Sebree <sasebreemicrosoft.com> Reviewed-by: Hiroshige Hayashizaki <hiroshigechromium.org> Reviewed-by: Kouhei Ueno <kouheichromium.org> Reviewed-by: Hiroki Nakagawa <nhirokichromium.org> Reviewed-by: Yuki Shiino <yukishiinochromium.org> Cr-Commit-Position: refs/heads/master{#724896} -- wpt-commits: 6fbd872e9ac5fe60e32946bc9b318be6eeada123 wpt-pr: 20012 UltraBlame original commit: 8c5b203f0fad559c872cc96687daa54cda3803bb
- Loading branch information
Showing
12 changed files
with
1,502 additions
and
0 deletions.
There are no files selected for viewing
287 changes: 287 additions & 0 deletions
287
...ests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,287 @@ | ||
< | ||
! | ||
doctype | ||
html | ||
> | ||
< | ||
head | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
resources | ||
/ | ||
testharness | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
resources | ||
/ | ||
testharnessreport | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
/ | ||
head | ||
> | ||
< | ||
body | ||
> | ||
< | ||
script | ||
> | ||
setup | ||
( | ||
{ | ||
allow_uncaught_exception | ||
: | ||
true | ||
} | ||
) | ||
; | ||
async_test | ||
( | ||
function | ||
( | ||
test | ||
) | ||
{ | ||
const | ||
worker | ||
= | ||
new | ||
Worker | ||
( | ||
" | ||
. | ||
/ | ||
resources | ||
/ | ||
worker | ||
. | ||
js | ||
" | ||
{ | ||
type | ||
: | ||
" | ||
module | ||
" | ||
} | ||
) | ||
; | ||
worker | ||
. | ||
onmessage | ||
= | ||
test | ||
. | ||
unreached_func | ||
( | ||
" | ||
A | ||
CSS | ||
Module | ||
within | ||
a | ||
web | ||
worker | ||
should | ||
not | ||
load | ||
. | ||
" | ||
) | ||
; | ||
worker | ||
. | ||
onerror | ||
= | ||
test | ||
. | ||
step_func_done | ||
( | ||
) | ||
; | ||
} | ||
" | ||
A | ||
static | ||
import | ||
CSS | ||
Module | ||
within | ||
a | ||
web | ||
worker | ||
should | ||
not | ||
load | ||
. | ||
" | ||
) | ||
; | ||
async_test | ||
( | ||
function | ||
( | ||
test | ||
) | ||
{ | ||
const | ||
worker | ||
= | ||
new | ||
Worker | ||
( | ||
" | ||
. | ||
/ | ||
resources | ||
/ | ||
worker | ||
- | ||
dynamic | ||
- | ||
import | ||
. | ||
js | ||
" | ||
{ | ||
type | ||
: | ||
" | ||
module | ||
" | ||
} | ||
) | ||
; | ||
worker | ||
. | ||
onmessage | ||
= | ||
test | ||
. | ||
step_func_done | ||
( | ||
e | ||
= | ||
> | ||
{ | ||
assert_equals | ||
( | ||
e | ||
. | ||
data | ||
" | ||
NOT | ||
LOADED | ||
" | ||
) | ||
; | ||
} | ||
) | ||
; | ||
} | ||
" | ||
A | ||
dynamic | ||
import | ||
CSS | ||
Module | ||
within | ||
a | ||
web | ||
worker | ||
should | ||
not | ||
load | ||
. | ||
" | ||
) | ||
; | ||
async_test | ||
( | ||
function | ||
( | ||
test | ||
) | ||
{ | ||
const | ||
worker | ||
= | ||
new | ||
Worker | ||
( | ||
" | ||
. | ||
/ | ||
resources | ||
/ | ||
basic | ||
. | ||
css | ||
" | ||
{ | ||
type | ||
: | ||
" | ||
module | ||
" | ||
} | ||
) | ||
; | ||
worker | ||
. | ||
onerror | ||
= | ||
test | ||
. | ||
step_func_done | ||
( | ||
) | ||
; | ||
} | ||
" | ||
A | ||
CSS | ||
Module | ||
within | ||
a | ||
web | ||
worker | ||
should | ||
not | ||
load | ||
. | ||
" | ||
) | ||
; | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
/ | ||
body | ||
> |
Oops, something went wrong.