svgnumber-animation-invalid-value-1.html (1265B)
1 <!doctype html> 2 <title>Test SVGNumber animation with invalid values: 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 <feComposite id="composite" in="SourceGraphic" in2="SourceAlpha" operator="arithmetic" k1="1"> 12 <animate attributeName="k1" begin="0s" dur="4s" from="ERROR" to="ERROR" /> 13 </feComposite> 14 </filter> 15 </defs> 16 <rect id="rect" x="0" y="0" width="100" height="100" fill="green" filter="url(#effect)" /> 17 </svg> 18 19 20 <script> 21 22 async_test(t => { 23 const svg = document.getElementById("svg"); 24 const composite = document.getElementById("composite"); 25 26 window.addEventListener('load', t.step_func(() => { 27 svg.setCurrentTime(2); 28 29 requestAnimationFrame(t.step_func_done(() => { 30 assert_equals(composite.k1.baseVal, 1); 31 assert_equals(composite.k1.animVal, composite.k1.baseVal); 32 })); 33 })); 34 }); 35 36 </script>