tor-browser

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

test_bbox-with-invalid-viewBox.xhtml (974B)


      1 <!DOCTYPE html>
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=433063
      5 -->
      6 <head>
      7  <title>Test for getBBox when the viewBox is invalid</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     10 </head>
     11 <body>
     12 
     13 <p id="display"></p>
     14 <div id="content" style="display: none"></div>
     15 
     16 <svg id="svg" xmlns="http://www.w3.org/2000/svg"
     17     style="width:200px; height:200px;" viewBox="0 0 200 0">
     18  <rect width="120" height="120"/>
     19 </svg>
     20 
     21 <pre id="test">
     22 <script class="testbody" type="application/javascript">
     23 SimpleTest.waitForExplicitFinish();
     24 
     25 function run() {
     26  var bbox = $("svg").getBBox();
     27  is(bbox.x, 0, "Check bbox.x");
     28  is(bbox.y, 0, "Check bbox.y");
     29  is(bbox.width, 120, "Check bbox.width");
     30  is(bbox.height, 120, "Check bbox.height");
     31  SimpleTest.finish();
     32 }
     33 
     34 window.addEventListener("load", run);
     35 </script>
     36 </pre>
     37 </body>
     38 </html>