<!doctype html>
<script type="text/javascript">
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
function waitForRafs(n) {
return new Promise(resolve => {
requestAnimationFrame(async () => {
if (n > 1)
await waitForRafs(n - 1);
resolve();
});
});
}
async function test() {
document.startViewTransition(() => { foo.bar = baz; });
await waitForRafs(10);
testRunner.notifyDone();
}
onload = requestAnimationFrame(() => requestAnimationFrame(test));
</script>