svglengthlist-animation-invalid-value-1.html (1212B)
1 <!doctype html> 2 <title>Test SVGLengthList animation with invalid values: String value in length list values for from and to attributes.</title> 3 <link rel="help" href="https://www.w3.org/TR/2001/REC-smil-animation-20010904/#FromAttribute"> 4 <link rel="help" href="https://www.w3.org/TR/2001/REC-smil-animation-20010904/#ToAttribute"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 8 <svg id="svg"> 9 <text id="text" x="50 70 90 110" y="50">ABCD 10 <animate attributeName="x" begin="0s" dur="4s" from="50 70 90 A" to="60 90 120 X" /> 11 </text> 12 </svg> 13 14 <script> 15 16 async_test(t => { 17 const svg = document.getElementById("svg"); 18 const text = document.getElementById("text"); 19 20 window.addEventListener('load', t.step_func(() => { 21 svg.setCurrentTime(2); 22 23 requestAnimationFrame(t.step_func_done(() => { 24 assert_array_equals( 25 Array.from(text.x.baseVal).map(v => v.value), 26 [50, 70, 90, 110] 27 ); 28 assert_array_equals( 29 Array.from(text.x.animVal).map(v => v.value), 30 Array.from(text.x.baseVal).map(v => v.value) 31 ); 32 })); 33 })); 34 }); 35 36 </script>