tor-browser

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

import-scripts-cross-origin.https.html (719B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Tests for importScripts: cross-origin</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="resources/test-helpers.sub.js"></script>
      7 <body>
      8 <script>
      9 promise_test(async t => {
     10    const scope = 'resources/import-scripts-cross-origin';
     11    await service_worker_unregister(t, scope);
     12    let reg = await navigator.serviceWorker.register(
     13      'resources/import-scripts-cross-origin-worker.sub.js', { scope: scope });
     14    t.add_cleanup(_ => reg.unregister());
     15    assert_not_equals(reg.installing, null, 'worker is installing');
     16  }, 'importScripts() supports cross-origin requests');
     17 </script>
     18 </body>