tor-browser

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

svgpath-animation-2.tentative.html (1077B)


      1 <!doctype html>
      2 <title>'inherit' path animation</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/resources/SVGAnimationTestCase-testharness.js"></script>
      6 <script src="support/animated-path-helpers.js"></script>
      7 <svg>
      8  <g style="d: path('M0,50h100')">
      9    <path stroke-width="100" stroke="green">
     10      <animate attributeName="d" attributeType="CSS" values="M0,50h50; inherit"
     11               dur="5s" fill="freeze"/>
     12    </path>
     13  </g>
     14 </svg>
     15 <script>
     16 const rootSVGElement = document.querySelector("svg");
     17 
     18 smil_async_test(t => {
     19  const path = document.querySelector("svg > g > path");
     20  const expectedValues = [
     21    // [animationId, time, sampleCallback]
     22    ["animation", 0,   () => {
     23      assert_animated_path_equals(path, "M 0 50 h 50");
     24    }],
     25    ["animation", 2.5, () => {
     26      assert_animated_path_equals(path, "M 0 50 h 75");
     27    }],
     28    ["animation", 5, () => {
     29      assert_animated_path_equals(path, "M 0 50 h 100");
     30    }]
     31  ];
     32  runAnimationTest(t, expectedValues);
     33 });
     34 </script>