tor-browser

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

svgpath-animation-invalid-value-1.html (968B)


      1 <!doctype html>
      2 <title>Test SVGPath animation with invalid values: Malformed path in by attribute.</title>
      3 <link rel="help" href="https://www.w3.org/TR/2001/REC-smil-animation-20010904/#ByAttribute">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="support/animated-path-helpers.js"></script>
      7 
      8 <svg id="svg">
      9  <path id="path" d="M 40 40 L 60 40 L 60 60 L 40 60 z" fill="green">
     10    <animate attributeName="d" by="ERROR" begin="0s" dur="4s" fill="freeze" />
     11  </path>
     12 </svg>
     13 
     14 <script>
     15 
     16 async_test(t => {
     17    const svg = document.getElementById("svg");
     18    const path = document.getElementById("path");
     19 
     20    window.addEventListener('load', t.step_func(() => {
     21        svg.setCurrentTime(2);
     22 
     23        requestAnimationFrame(t.step_func_done(() => {
     24          assert_animated_path_equals(path,
     25                               "M 40 40 L 60 40 L 60 60 L 40 60 z");
     26        }));
     27    }));
     28  });
     29 
     30 </script>