Bug
1710945 [wpt PR 28980] - Extend CSS module test coverage, a=testonly
Automatic update from web-platform-tests
Extend CSS module test coverage
Add tests for CSS modules to match the level of coverage that currently
exists for JSON modules. The new tests are mostly straightforward
copies of the JSON modules tests, switched over to CSS.
- Cross-origin imports fail without the
Access-Control-Allow-Origin response header.
- The crossOrigin CORS policy is respected
- referrerPolicy is respected.
- The <script> element's integrity attribute is respected.
- CSS modules are always decoded as UTF-8 regardless of Content-Type
or the document's encoding. The existing coverage we had on this in
utf8.tentative.html was renamed to charset.html, refactored, and
expanded.
- CSS MIME type checks work correctly.
- Validate that the load event fires when appropriate for
a <script> element containing a CSS module import. Also check that
the error event is fired when a CSS module 404s.
- A <script type="module"> with a src that is CSS doesn't load.
Also add a couple of checks for @import and parse error behavior in
import-css-module-basic.html.
Bug: 992499
Change-Id: I93c7196918876d3657ecfd7d38daee7504fa98b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
2877633
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#888146}
--
wpt-commits:
d94d1a58eaf5bada062c280d527202eff816fcb7
wpt-pr: 28980