tor-browser

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

test_register_base.html (1039B)


      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 that registering a service worker uses the docuemnt URI for the secure origin check</title>
      9  <script type="text/javascript" src="http://mochi.test:8888/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="http://mochi.test:8888/tests/SimpleTest/test.css" />
     11  <base href="https://mozilla.org/">
     12 </head>
     13 <body>
     14 <p id="display"></p>
     15 <div id="content" style="display: none">
     16 </div>
     17 <pre id="test"></pre>
     18 <script class="testbody" type="text/javascript">
     19 
     20  function runTest() {
     21    ok(!("serviceWorker" in navigator), "ServiceWorkerContainer shouldn't be defined");
     22    SimpleTest.finish();
     23  }
     24 
     25  SimpleTest.waitForExplicitFinish();
     26  onload = function() {
     27    SpecialPowers.pushPrefEnv({"set": [
     28      ["dom.serviceWorkers.exemptFromPerDomainMax", true],
     29      ["dom.serviceWorkers.enabled", true],
     30    ]}, runTest);
     31  };
     32 </script>
     33 </body>
     34 </html>