tor-browser

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

test_multiple_font_size.html (828B)


      1 <!DOCTYPE HTML>
      2 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      3 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
      4 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1370646">Mozilla Bug 1370646</a>
      5 
      6 <svg xmlns="http://www.w3.org/2000/svg" width="440" height="100" viewBox="0 0 440 100">
      7  <text>
      8    <tspan id="a" style="font-size:100px">3</tspan>
      9  </text>
     10  <text>
     11    <tspan id="b" style="font-size:100px">3</tspan>
     12    <tspan style="font-size:0.1px">0</tspan>
     13  </text>
     14 </svg>
     15 
     16 <script type="application/javascript">
     17  SimpleTest.waitForExplicitFinish();
     18 
     19  let alen = document.getElementById("a").getComputedTextLength(),
     20      blen = document.getElementById("b").getComputedTextLength();
     21 
     22  SimpleTest.isfuzzy(alen, blen, 5, "lengths should be close");
     23 
     24  SimpleTest.finish();
     25 </script>