tor-browser

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

test_sanityRegisteredServiceWorker.html (702B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <title>Test that service worker registrations not cleaned up in mochitests cause failures</title>
      5  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6 </head>
      7 <body>
      8 <script>
      9 SimpleTest.waitForExplicitFinish();
     10 SimpleTest.expectRegisteredServiceWorker();
     11 SpecialPowers.pushPrefEnv({"set": [
     12  ["dom.serviceWorkers.exemptFromPerDomainMax", true],
     13  ["dom.serviceWorkers.enabled", true],
     14  ["dom.serviceWorkers.testing.enabled", true]
     15 ]}, function() {
     16  navigator.serviceWorker.register("empty.js", {scope: "scope"})
     17    .then(function(registration) {
     18      ok(registration, "Registration succeeded");
     19      SimpleTest.finish();
     20    });
     21 });
     22 </script>
     23 </body>
     24 </html>