shadowrealm-promise-rejection.https.html (696B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="resources/test-helpers.sub.js"></script> 5 <body> 6 <script> 7 const worker = 'resources/shadowrealm-promise-rejection-test-worker.js'; 8 9 promise_test(async (t) => { 10 assert_not_equals( 11 self.ShadowRealm, undefined, 12 'ShadowRealm should be defined.'); 13 const scope = 'resources/'; 14 const reg = await service_worker_unregister_and_register(t, worker, scope); 15 await wait_for_state(t, reg.installing, 'activated'); 16 await reg.unregister(); 17 }, 'Promise rejections within worker thread ShadowRealms are handled'); 18 19 </script> 20 </body> 21 </html>