svgintegeroptionalinteger-animation-invalid-value-1.html (1337B)
1 <!doctype html> 2 <title>Test SVGIntegerOptionalInteger animation with invalid value: String values in 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 <defs> 10 <filter id="effect"> 11 <feConvolveMatrix id="matrix" order="3 3" kernelMatrix="0 0 0 0 1 0 0 0 0"> 12 <animate attributeName="order" begin="0s" dur="4s" from="A B" to="C D" /> 13 </feConvolveMatrix> 14 </filter> 15 </defs> 16 <rect x="10" y="10" width="80" height="80" fill="blue" filter="url(#effect)" /> 17 </svg> 18 19 <script> 20 21 async_test(t => { 22 const svg = document.getElementById("svg"); 23 const matrix = document.getElementById("matrix") 24 25 window.addEventListener('load', t.step_func(() => { 26 svg.setCurrentTime(2); 27 28 requestAnimationFrame(t.step_func_done(() => { 29 assert_equals(matrix.orderX.baseVal, 3); 30 assert_equals(matrix.orderY.baseVal, 3); 31 assert_equals(matrix.orderX.animVal, matrix.orderX.baseVal); 32 assert_equals(matrix.orderY.animVal, matrix.orderY.baseVal); 33 })); 34 })); 35 }); 36 37 </script>