Status: FAIL | Duration: 45ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-view-transitions/view-transition-waituntil-animation-manipulation.html
<!DOCTYPE html> <html class=reftest-wait> <title>View transitions: waitUntil allows animation manipulation</title> <link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/"> <link rel="author" href="mailto:vmpstr@chromium.org"> <link rel="match" href="view-transition-waituntil-animation-manipulation-ref.html"> <script src="/common/reftest-wait.js"></script> <style> :root { view-transition-name: none } #target { width: 100px; height: 100px; background: green; view-transition-name: target; } #target.after { background: red; } ::view-transition { background: lightpink; } ::view-transition-group(*) { animation-duration: 1ms; } </style> <div id=target></div> <script> failIfNot(document.startViewTransition, "Missing document.startViewTransition"); failIfNot(ViewTransition.prototype.waitUntil, "ViewTransition.waitUntil is not available"); async function runTest() { const transition = document.startViewTransition(() => target.classList.add("after")); transition.waitUntil(new Promise(() => {})); transition.ready.then(async () => { // Let the animation run to the end. const animations = document.getAnimations(); animations.forEach(a => { a.currentTime = 1; }); // Wait a few frames. await new Promise(requestAnimationFrame); await new Promise(requestAnimationFrame); await new Promise(requestAnimationFrame); // Now, rewind the animation and take a screenshot. requestAnimationFrame(() => { animations.forEach(a => { a.play(); a.pause(); a.currentTime = 0; }); takeScreenshot(); }); }); } onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); </script>
/css/css-view-transitions/view-transition-waituntil-animation-manipulation-ref.html
<!DOCTYPE html> <title>View transitions: waitUntil allows animation manipulation (reference)</title> <link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/"> <link rel="author" href="mailto:vmpstr@chromium.org"> <style> body { background: lightpink; } .target { width: 100px; height: 100px; background: green; } </style> <div class=target></div>