<!DOCTYPE html> | |
<div id="target">Test.</div> | |
<script> | |
if (window.testRunner) | |
testRunner.waitUntilDone(); | |
function waitForCompositor() { | |
return document.body.animate({opacity: [1, 1]}, 1).finished; | |
} | |
target.animate({translate: '100px'}, 1e8); | |
requestAnimationFrame(() => { | |
requestAnimationFrame(() => { | |
target.style.translate = '100px'; | |
requestAnimationFrame(() => { | |
waitForCompositor().then(() => { | |
if (window.testRunner) | |
testRunner.notifyDone(); | |
}); | |
}); | |
}); | |
}); | |
</script> |