first-interval-in-the-past-dont-contribute.html (974B)
1 <!DOCTYPE html> 2 <title>Animation element that end before time container begin</title> 3 <link rel="help" href="https://www.w3.org/TR/2001/REC-smil-animation-20010904/#Timing-BeginEnd-LC-Start"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="/common/rendering-utils.js"></script> 7 <svg> 8 <rect width="100" height="100" fill="green"> 9 <animate attributeName="fill" values="red;red" begin="-1s" dur="1s" fill="freeze"/> 10 </rect> 11 <set attributeName="stroke-width" to="10"/> 12 </svg> 13 <script> 14 promise_test(t => { 15 const animationStart = new Promise(resolve => { 16 document.querySelector('set').onbegin = resolve; 17 }); 18 return animationStart 19 .then(() => 20 waitForAtLeastOneFrame()) 21 .then(() => { 22 const rect = document.querySelector('rect'); 23 assert_equals(getComputedStyle(rect).fill, 'rgb(0, 128, 0)', 'animation does not apply'); 24 }); 25 }); 26 </script>