Test if WebSocket is closed on unload On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS ws on main document is ready. PASS insert a iframe, where open ws called 'socket1' PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws... PASS closedSocket is "socket1" PASS closeCode is "1001" PASS successfullyParsed is true TEST COMPLETE