two-clip-path-animation-diff-length1.html (1136B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#basic-shape-interpolation"> 4 <link rel="match" href="two-clip-path-animation-diff-length1-ref.html"> 5 <style> 6 #container { 7 width: 100px; 8 height: 100px; 9 background-color: green; 10 animation: clippath2 10s step-end; 11 } 12 13 @keyframes clippath2 { 14 0% { 15 clip-path: inset(10px 10px); 16 } 17 18 100% { 19 clip-path: inset(11px 11px); 20 } 21 } 22 </style> 23 <script src="/common/reftest-wait.js"></script> 24 <script src="../../../../web-animations/testcommon.js"></script> 25 26 <body> 27 <div id="container"></div> 28 29 <script> 30 // This test ensures that if we have two different-length animations, when 31 // the one with higher compositing order finishes, the other one would still 32 // run normally. 33 document.getAnimations()[0].ready.then(() => { 34 document.getElementById("container").animate( 35 [ 36 { clipPath: "circle(10% at 50% 50%)" }, 37 { clipPath: "circle(50% at 50% 50%)" }, 38 ], 39 100, 40 ).finished.then(takeScreenshot); 41 }); 42 </script> 43 </body> 44 45 </html>