tor-browser

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

test_bug842853.html (1217B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=842853
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 842853</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script type="application/javascript">
     12 
     13  /** Test for Bug 842853 */
     14 
     15 SimpleTest.waitForExplicitFinish();
     16 
     17 async function runTest() {
     18  var win = e.contentWindow;
     19  if (win.location.hash != '') {
     20    // Allow a half pixel difference because the scroll position is aligned with
     21    // screen pixels instead of CSS pixels (bug 1774315).
     22    isfuzzy(win.scrollY, 500, 0.5);
     23    SimpleTest.finish();
     24    return;
     25  }
     26  win.location.hash='#anchor'
     27  win.scrollTo(0,500);
     28  win.location.reload()
     29 }
     30 
     31 
     32  </script>
     33 </head>
     34 <body>
     35 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=842853">Mozilla Bug 842853</a>
     36 <p id="display"></p>
     37 <div id="content" style="display: none">
     38 
     39 </div>
     40 <pre id="test">
     41 </pre>
     42 <script>
     43 
     44 var e = document.createElement('iframe');
     45 var url = 'file_bug842853-frame.html';
     46 e.setAttribute('src',url);
     47 e.setAttribute('onload','runTest()');
     48 document.body.appendChild(e);
     49 
     50 </script>
     51 </body>
     52 </html>