tor-browser

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

symbol-g-graphics-element.html (880B)


      1 <!DOCTYPE html>
      2 <title>SVG Test: &lt;g&gt; and &lt;symbol&gt; are SVGGraphicsElements</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <svg>
      6  <g transform="translate(200, 0)">
      7    <rect width="100" height="100"></rect>
      8  </g>
      9  <symbol transform="translate(100, 0)">
     10    <rect width="100" height="100"></rect>
     11  </symbol>
     12 </svg>
     13 <script>
     14  const g = document.querySelector("g");
     15  const symbol = document.querySelector("symbol");
     16  test(() => {
     17    assert_equals(getComputedStyle(g).transform, "matrix(1, 0, 0, 1, 200, 0)");
     18  }, "<g> element has transform presentation style from being an SVGGraphicsElement");
     19  test(() => {
     20    assert_equals(getComputedStyle(symbol).transform, "matrix(1, 0, 0, 1, 100, 0)");
     21  }, "<symbol> element has transform presentation style from being an SVGGraphicsElement");
     22 </script>