1
0
Fork 0
firefox/testing/web-platform/tests/css/css-view-transitions/no-painting-while-render-blocked.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

31 lines
948 B
HTML

<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: Rendering suppression prevents painting</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/#document-rendering-suppression-for-view-transitions">
<link rel="author" href="mailto:mattwoodrow@apple.com">
<link rel="match" href="no-painting-while-render-blocked-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
#target {
width: 200px;
height: 200px;
background: green;
}
</style>
<div id=target></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
let transition = document.startViewTransition(async () => {
document.getElementById('target').style.backgroundColor = "red";
takeScreenshot();
await new Promise(resolve => setTimeout(resolve, 5000));
});
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>