tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

svgnumberlist-animation-invalid-value-1.html (1240B)


      1 <!doctype html>
      2 <title>Test SVGNumberList animation with invalid values: String value in from list attribute.</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="40 60 80 100" y="60" rotate="15 20 30 40" fill="green">ABCD
     10        <animate attributeName="rotate" from="0 0 0 A" to="45 90 135 A" begin="0s" dur="4s" />
     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.rotate.baseVal).map(v => v.value),
     26            [15, 20, 30, 40]
     27          );
     28          assert_array_equals(
     29            Array.from(text.rotate.animVal).map(v => v.value),
     30            Array.from(text.rotate.baseVal).map(v => v.value)
     31          );
     32        }));
     33    }));
     34  });
     35 
     36 </script>