tor-browser

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

activation-after-registration.https.html (917B)


      1 <!DOCTYPE html>
      2 <title>Service Worker: Activation occurs after registration</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="resources/test-helpers.sub.js"></script>
      6 <body>
      7 <script>
      8 promise_test(function(t) {
      9    var scope = 'resources/blank.html';
     10    var registration;
     11 
     12    return service_worker_unregister_and_register(
     13        t, 'resources/empty-worker.js', scope)
     14      .then(function(r) {
     15          t.add_cleanup(function() {
     16              return service_worker_unregister(t, scope);
     17            });
     18 
     19          registration = r;
     20          assert_equals(
     21              r.installing.state,
     22              'installing',
     23              'worker should be in the "installing" state upon registration');
     24          return wait_for_state(t, r.installing, 'activated');
     25        });
     26 }, 'activation occurs after registration');
     27 </script>
     28 </body>