| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="/js-test-resources/js-test.js"></script> | 4 <script src="/js-test-resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <div id="description"></div> | 7 <div id="description"></div> |
| 8 <div id="console"></div> | 8 <div id="console"></div> |
| 9 <script type="text/javascript"> | 9 <script type="text/javascript"> |
| 10 description("Handshake error test"); | 10 description("Handshake error test"); |
| 11 | 11 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 29 testFailed("Unexpectedly Received: '" + messageEvent.data + "'"); | 29 testFailed("Unexpectedly Received: '" + messageEvent.data + "'"); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 ws.onclose = function() | 32 ws.onclose = function() |
| 33 { | 33 { |
| 34 debug("Closed."); | 34 debug("Closed."); |
| 35 shouldBe("ws.readyState", "3") | 35 shouldBe("ws.readyState", "3") |
| 36 endTest(); | 36 endTest(); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 ws.onerror = function(errorEvent) |
| 40 { |
| 41 testPassed("onerror() was called"); |
| 42 }; |
| 43 |
| 39 function timeOutCallback() | 44 function timeOutCallback() |
| 40 { | 45 { |
| 41 testFailed("Timed out in state: " + ws.readyState); | 46 testFailed("Timed out in state: " + ws.readyState); |
| 42 endTest(); | 47 endTest(); |
| 43 } | 48 } |
| 44 | 49 |
| 45 var timeoutID = setTimeout(timeOutCallback, 3000); | 50 var timeoutID = setTimeout(timeOutCallback, 3000); |
| 46 | 51 |
| 47 </script> | 52 </script> |
| 48 </body> | 53 </body> |
| 49 </html> | 54 </html> |
| OLD | NEW |