tor-browser

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

sxg-sw-register-after-fallback.tentative.https.html (895B)


      1 <!DOCTYPE html>
      2 <title>Service worker registration after fallback</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/common/get-host-info.sub.js"></script>
      6 <script src="../resources/sxg-util.js"></script>
      7 <body>
      8 <script>
      9 promise_test(async (t) => {
     10  const sxgUrl =
     11      get_host_info().HTTPS_ORIGIN +
     12      '/signed-exchange/resources/sxg/register-sw-after-fallback.sxg';
     13  const message = await openSXGInIframeAndWaitForMessage(t, sxgUrl);
     14  assert_equals(message.location,
     15                get_host_info().HTTPS_ORIGIN +
     16                '/signed-exchange/resources/register-sw-after-fallback.html');
     17  assert_true(message.is_fallback);
     18 
     19  assert_equals(message.err, undefined);
     20  assert_equals(message.iframe_body, 'Generated by service worker');
     21 }, 'Service worker registration after fallback');
     22 </script>
     23 </body>