tor-browser

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

navigationPreload.https.html (905B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>ServiceWorker: navigator.serviceWorker.navigationPreload</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 <script src="resources/helpers.js"></script>
      8 <script>
      9 promise_test(async t => {
     10  const SCRIPT = '../resources/empty-worker.js';
     11  const SCOPE = '../resources/navigationpreload';
     12  const registration =
     13      await service_worker_unregister_and_register(t, SCRIPT, SCOPE);
     14  const navigationPreload = registration.navigationPreload;
     15  assert_true(navigationPreload instanceof NavigationPreloadManager,
     16              'ServiceWorkerRegistration.navigationPreload');
     17  await registration.unregister();
     18 }, "The navigationPreload attribute must return service worker " +
     19    "registration's NavigationPreloadManager object.");
     20 </script>