mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 077d53c8da8b47c1d5060893af96a29f27b10008
This commit is contained in:
parent
29103941fe
commit
08d41a134a
74 changed files with 413 additions and 331 deletions
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/#hostimportmoduledynamically(referencingscriptormodule,-specifier,-promisecapability)">
|
||||
<link rel="match" href="dynamic-import-ref.html">
|
||||
<style>
|
||||
#output {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-image: paint(rects);
|
||||
background-color: blue;
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
<body>
|
||||
<div id="output"></div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerPaint('rects', class {
|
||||
async paint(ctx, geom) {
|
||||
ctx.fillStyle = 'red';
|
||||
try {
|
||||
await import('./resources/imported-module.mjs');
|
||||
} catch (e) {
|
||||
if (e.constructor === TypeError) {
|
||||
ctx.fillStyle = 'green';
|
||||
}
|
||||
}
|
||||
ctx.fillRect(0, 0, geom.width, geom.height);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue