Update web-platform-tests to revision 821a1ef63f08a7329175513b6c2eb00bb8b0152e

This commit is contained in:
WPT Sync Bot 2020-12-29 08:21:44 +00:00
parent 388bf93e07
commit d36d2d0fd5
140 changed files with 645 additions and 629 deletions

View file

@ -18,6 +18,20 @@
document.body.appendChild(iframe);
}, "A CSS Module should load");
async_test(function (test) {
// This tests potential streaming compilation of modules in
// Chromium that is triggered only for large (32>KiB) files in older
// versions.
const iframe = document.createElement("iframe");
iframe.src = "resources/css-module-basic-large-iframe.html";
iframe.onload = test.step_func_done(function () {
assert_equals(getComputedStyle(iframe.contentDocument.querySelector('#test'))
.backgroundColor, "rgb(255, 0, 0)",
"CSS module import should succeed");
});
document.body.appendChild(iframe);
}, "A large CSS Module should load");
async_test(function (test) {
const iframe = document.createElement("iframe");
iframe.src = "resources/css-module-at-import-iframe.html";
@ -41,4 +55,4 @@
document.body.appendChild(iframe);
}, "Malformed CSS should not load");
</script>
</body>
</body>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<body>
<script>
window.onerror = function (errorMsg, url, lineNumber, column, errorObj)
{
document.load_error = errorObj.name;
return true;
};
</script>
<script type="module">
import v from "./basic-large.css";
document.adoptedStyleSheets = [v];
</script>
<div id="test">
I am a test div.
</div>
</body>