tor-browser

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

shared-worker-rt-entry.html (927B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8" />
      5 <title>Resource Timing Entry for Shared Workers</title>
      6 <link rel="help" href="https://w3c.github.io/resource-timing/"/>
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script src="/common/utils.js"></script>
     10 </head>
     11 <body>
     12 <script>
     13    promise_test(async () => {
     14        const url = new URL(`resources/shared-worker.js?${token()}`, location.href).toString();
     15        const worker = new SharedWorker(url, 'name');
     16        const {data} = await new Promise(resolve => {
     17            worker.port.onmessage = resolve;
     18        });
     19 
     20        const timeOrigin = data;
     21        const entries = performance.getEntriesByName(url);
     22        assert_equals(entries.length, 0, "SharedWorker should not create a ResourceTiming entry");
     23    }, "Shared workers should not generate Resource Timing Entries");
     24 </script>
     25 </body>
     26 </html>