tor-browser

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

test_bug704063.html (1623B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug </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  */
     14  SimpleTest.waitForExplicitFinish();
     15  var firstRan = false;
     16  var secondRan = false;
     17  function second(time) {
     18    is(firstRan, true, "We were called second");
     19    secondRan = true;
     20    ok(Math.abs(time - performance.now()) < 3600000,
     21       "An hour really shouldn't have passed here");
     22    ok(Math.abs(time - Date.now()) > 3600000,
     23       "More than an hour should have passed since 1970");
     24  }
     25  function first(time) {
     26    is(secondRan, false, "second() was called first");
     27    firstRan = true;
     28    ok(Math.abs(time - performance.now()) < 3600000,
     29       "An hour really shouldn't have passed here either");
     30    ok(Math.abs(time - Date.now()) > 3600000,
     31       "More than an hour should have passed since 1970 here either");
     32  }
     33  function third() {
     34    ok(firstRan, "We should be after the first call");
     35    ok(secondRan, "We should be after the second call");
     36    SimpleTest.finish();
     37  }
     38 
     39  window.onload = function() {
     40    window.requestAnimationFrame(first);
     41    window.requestAnimationFrame(second);
     42    window.requestAnimationFrame(third);
     43  }
     44 
     45  </script>
     46 </head>
     47 <body>
     48 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
     49 <p id="display"></p>
     50 <div id="content" style="display: none">
     51 
     52 </div>
     53 <pre id="test">
     54 </pre>
     55 </body>
     56 </html>