tor-browser

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

test_bug717819.html (1004B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=717819
      5 -->
      6 <head>
      7  <title>Test for Bug 717819</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <script src="/tests/SimpleTest/EventUtils.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11 </head>
     12 <body>
     13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=717819">Mozilla Bug 717819</a>
     14 <p id="display"></p>
     15 <div id="content">
     16  <table style="position: relative; top: 100px;">
     17    <tr>
     18      <td>
     19        <div id="test" style="position: absolute; top: 50px;"></div>
     20      </td>
     21    </tr>
     22  </table>
     23 </div>
     24 <pre id="test">
     25 <script type="application/javascript">
     26 
     27 /** Test for Bug 717819 */
     28 var div = document.getElementById("test");
     29 is(div.offsetTop, 50, "The offsetTop must be calculated correctly");
     30 is(div.offsetParent, document.querySelector("table"),
     31   "The offset should be calculated off of the correct parent");
     32 
     33 </script>
     34 </pre>
     35 </body>
     36 </html>