chromium/third_party/blink/web_tests/external/wpt/css/css-view-transitions/no-painting-while-render-blocked.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:[email protected]">
<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>