file_bug1384658.html (436B)
1 <!DOCTYPE html> 2 <html> 3 <script> 4 onload = function() { 5 function done(success) { 6 var bc = SpecialPowers.wrap(BroadcastChannel).unpartitionedTestingChannel("test_channel"); 7 bc.postMessage({success}); 8 bc.close(); 9 } 10 try { 11 new WebSocket("ws://mochi.test:8888/tests/dom/websocket/tests/file_websocket_basic"); 12 done(true); // no hang! 13 } catch (e) { 14 done(false); 15 } 16 } 17 </script> 18 </html>