tor-browser

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

svgrect-animation-invalid-value-1.html (1425B)


      1 <!doctype html>
      2 <title>Test SVGRect animation with invalid values: No spaces between numbers and units in viewbox for from 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/#ByAttribute">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 
      8 <svg id="svg" viewBox="0 0 100 100">
      9    <animate attributeName="viewbox" from="0  px 0  px 100  px 100  px" by="50 50 50 50" begin="0s" dur="4s" />
     10    <rect width="100" height="100" fill="green" />
     11 </svg>
     12 
     13 <script>
     14 
     15 async_test(t => {
     16    const svg = document.getElementById("svg");
     17 
     18     window.addEventListener('load', t.step_func(() => {
     19        svg.setCurrentTime(2);
     20 
     21        requestAnimationFrame(t.step_func_done(() => {
     22          assert_equals(svg.viewBox.baseVal.x, 0);
     23          assert_equals(svg.viewBox.baseVal.y, 0);
     24          assert_equals(svg.viewBox.baseVal.width, 100);
     25          assert_equals(svg.viewBox.baseVal.height, 100);
     26 
     27          assert_equals(svg.viewBox.animVal.x, svg.viewBox.baseVal.x);
     28          assert_equals(svg.viewBox.animVal.y, svg.viewBox.baseVal.y);
     29          assert_equals(svg.viewBox.animVal.width, svg.viewBox.baseVal.width);
     30          assert_equals(svg.viewBox.animVal.height, svg.viewBox.baseVal.height);
     31        }));
     32    }));
     33  });
     34 
     35 </script>