tor-browser

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

test_worker_user_timing.html (991B)


      1 <!--
      2  Any copyright is dedicated to the Public Domain.
      3  http://creativecommons.org/publicdomain/zero/1.0/
      4 -->
      5 <!DOCTYPE HTML>
      6 <html>
      7  <head>
      8    <title>Test for worker performance timing API</title>
      9    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
     10    <script src="/tests/SimpleTest/SimpleTest.js"></script>
     11  </head>
     12  <body>
     13    <script class="testbody" type="text/javascript">
     14 
     15 var worker = new Worker('worker_performance_user_timing.js');
     16 worker.onmessage = function(event) {
     17  if (event.data.type == 'finish') {
     18    SpecialPowers.setBoolPref("privacy.reduceTimerPrecision", reduceTimePrecisionPrevPrefValue);
     19    SimpleTest.finish();
     20  } else if (event.data.type == 'status') {
     21    ok(event.data.status, event.data.msg);
     22  }
     23 }
     24 
     25 var reduceTimePrecisionPrevPrefValue = SpecialPowers.getBoolPref("privacy.reduceTimerPrecision");
     26 SpecialPowers.setBoolPref("privacy.reduceTimerPrecision", false);
     27 SimpleTest.waitForExplicitFinish();
     28    </script>
     29  </body>
     30 </html>