Test that readyState is CLOSED within onerror event On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". Test start (Port 8880) PASS ws.readyState is 3 PASS successfullyParsed is true TEST COMPLETE