mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests Fix a css-paint-api/ layout test failure This CL fixes a failing layout test dynamic-import.html. The problem with it is that all the file name under css-paint-api/ needs to be foo.https.html so that our test infra knows that it should spin up an https server to run that test. The failing test doesn't have the right suffix and that's why. This Cl simply rename the test and it should be good. Bug: 1157960 Change-Id: I3cdad68715eb0289b4a8707fa1d4c8a63421e031 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606483 Commit-Queue: Xida Chen <[email protected]> Reviewed-by: Yi Gu <[email protected]> Cr-Commit-Position: refs/heads/master@{#840031} -- wpt-commits: 48a1ecbe24071b12c6cb2f2afe0dd16f910a958b wpt-pr: 27036
38 lines
1.0 KiB
HTML
38 lines
1.0 KiB
HTML
<!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>
|