svglength-animation-invalid-value-9.html (980B)
1 <!doctype html> 2 <title>Test SVGLength animation with invalid value: No spaces between number and unit in values attribute.</title> 3 <link rel="help" href="https://www.w3.org/TR/2001/REC-smil-animation-20010904/#ValuesAttribute"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 7 <svg id="svg"> 8 <rect id="rect" x="0" width="100" height="100" fill="green"> 9 <animate attributeName="width" begin="0s" dur="4s" values="0px;100px;300px;500 px;700px" /> 10 </rect> 11 </svg> 12 13 <script> 14 15 async_test(t => { 16 const svg = document.getElementById("svg"); 17 const rect = document.getElementById("rect"); 18 19 window.addEventListener('load', t.step_func(() => { 20 svg.setCurrentTime(2); 21 22 requestAnimationFrame(t.step_func_done(() => { 23 assert_equals(rect.width.baseVal.value, 100); 24 assert_equals(rect.width.animVal.value, rect.width.baseVal.value); 25 })); 26 })); 27 }); 28 29 </script>