null-arguments.html (473B)
1 <!doctype html> 2 <title>null as arguments</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script> 6 async_test(t => { 7 const worker = new SharedWorker(null, null); 8 worker.port.onmessage = t.step_func_done(e => { 9 assert_equals(e.data[0], 'null', 'first arg (script name)'); 10 assert_equals(e.data[1], '', 'second arg (worker name)'); 11 }); 12 }, 'Test constructing a shared worker with null'); 13 </script>