| OLD | NEW |
| 1 <!DOCTYPE HTML> | 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> | 9 <script> |
| 10 description("Test that WebSocket handshake fails if there are more one Sec-WebSo
cket-Accept header field in the response."); | 10 description("Test that WebSocket handshake fails if there are more one Sec-WebSo
cket-Accept header field in the response."); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 ws.onmessage = function(messageEvent) | 28 ws.onmessage = function(messageEvent) |
| 29 { | 29 { |
| 30 testFailed("Unexpectedly Received: '" + messageEvent.data + "'"); | 30 testFailed("Unexpectedly Received: '" + messageEvent.data + "'"); |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 ws.onclose = function() | 33 ws.onclose = function() |
| 34 { | 34 { |
| 35 endTest(); | 35 endTest(); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 ws.onerror = function(errorEvent) |
| 39 { |
| 40 testPassed("onerror() was called"); |
| 41 }; |
| 42 |
| 38 function timeOutCallback() | 43 function timeOutCallback() |
| 39 { | 44 { |
| 40 debug("Timed out in state: " + ws.readyState); | 45 debug("Timed out in state: " + ws.readyState); |
| 41 endTest(); | 46 endTest(); |
| 42 } | 47 } |
| 43 | 48 |
| 44 var timeoutID = setTimeout(timeOutCallback, 3000); | 49 var timeoutID = setTimeout(timeOutCallback, 3000); |
| 45 | 50 |
| 46 </script> | 51 </script> |
| 47 </body> | 52 </body> |
| 48 </html> | 53 </html> |
| OLD | NEW |