summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/performance-timeline/navigation-id-worker-created-entries.html
blob: 96fc57be1d426c9c364fe20359dafebf60380fd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!doctype html>
<html>

<head>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
</head>

<body>
  <script>
    promise_test(async () => {
      const worker = new Worker("resources/worker-navigation-id.js");

      const navigationId = await new Promise(resolve => {
        worker.onmessage = (e) => {
          resolve(e.data);
        };
        worker.postMessage('');
      });

      assert_equals(navigationId.length, 0,
        'Navigation id of performance entries created by a worker should be empty.');
    }, 'Navigation id of performance entries created by workers should be empty');
  </script>
</body>

</html>