Automatic update from web-platform-tests Re-enable virtual/off-main-thread-css-paint/ tests I suspect that due to paint holding two requestAnimationFrames was not consistently enough time to ensure a drawn frame. However, in other tests we use the starting of a composited animation to know when we have for sure drawn a new main frame. By applying the same technique for paint worklet we can re-enable these tests without the same flakiness. Bug: 355693577 Change-Id: I104f229257dc8fa051f8bf6c3c1e569ff2cbe48a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7726989 Reviewed-by: Vladimir Levin <vmpstr@chromium.org> Commit-Queue: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1610775} -- wpt-commits: e2d58307df0b8139854ad974ef2e4908d2a62baa wpt-pr: 59020
33 lines
835 B
HTML
33 lines
835 B
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<link rel="help" href="https://drafts.css-houdini.org/css-paint-api/">
|
|
<link rel="match" href="roundrect-ref.html">
|
|
<meta name="fuzzy" content="maxDifference=0-128;totalPixels=0-200">
|
|
<style>
|
|
#output {
|
|
width: 300px;
|
|
height: 400px;
|
|
background-image: paint(paths);
|
|
}
|
|
</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('paths', class {
|
|
paint(ctx, geom) {
|
|
ctx.beginPath();
|
|
ctx.roundRect(10, 10, 100, 100, [20]);
|
|
ctx.fill();
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
|
|
</script>
|
|
</body>
|
|
</html>
|