applying-the-composited-result.html (866B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>Applying the composited result</title> 4 <link rel="help" 5 href="https://drafts.csswg.org/web-animations-1/#applying-the-composited-result"> 6 <script src=/resources/testharness.js></script> 7 <script src=/resources/testharnessreport.js></script> 8 <script src="../../testcommon.js"></script> 9 <div id="log"></div> 10 <script> 11 'use strict'; 12 13 promise_test(async t => { 14 const div = createDiv(t); 15 div.style.marginLeft = '10px'; 16 const animation = div.animate( 17 { marginLeft: ['100px', '200px'] }, 18 100 * MS_PER_SEC 19 ); 20 await animation.ready; 21 22 animation.finish(); 23 24 const marginLeft = parseFloat(getComputedStyle(div).marginLeft); 25 assert_equals(marginLeft, 10, 'The computed style should be reset'); 26 }, 'Finishing an animation that does not fill forwards causes its animation' 27 + ' style to be cleared'); 28 29 </script>