navigation-id-worker-created-entries.html (638B)
1 <!doctype html> 2 <html> 3 4 <head> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 </head> 8 9 <body> 10 <script> 11 promise_test(async () => { 12 const worker = new Worker("resources/worker-navigation-id.js"); 13 14 const navigationId = await new Promise(resolve => { 15 worker.onmessage = (e) => { 16 resolve(e.data); 17 }; 18 worker.postMessage(''); 19 }); 20 21 assert_equals(navigationId, 0, '0 indicates the absence of a navigation id.'); 22 }, 'Navigation id of performance entries created by workers should be 0.'); 23 </script> 24 </body> 25 26 </html>