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 whether WebSocket handshake fails if the server sends mismatch
ed Sec-WebSocket-Protocol header."); | 10 description("Test whether WebSocket handshake fails if the server sends mismatch
ed Sec-WebSocket-Protocol header."); |
(...skipping 21 matching lines...) Expand all Loading... |
32 ws.onclose = function(event) | 32 ws.onclose = function(event) |
33 { | 33 { |
34 closeEvent = event; | 34 closeEvent = event; |
35 shouldBeFalse("closeEvent.wasClean"); | 35 shouldBeFalse("closeEvent.wasClean"); |
36 if (index === protocolCase.length - 1) { | 36 if (index === protocolCase.length - 1) { |
37 finishJSTest(); | 37 finishJSTest(); |
38 return; | 38 return; |
39 } | 39 } |
40 doTest(index + 1); | 40 doTest(index + 1); |
41 }; | 41 }; |
| 42 |
| 43 ws.onerror = function(errorEvent) |
| 44 { |
| 45 testPassed("onerror() was called"); |
| 46 }; |
42 } | 47 } |
43 | 48 |
44 doTest(0); | 49 doTest(0); |
45 | 50 |
46 </script> | 51 </script> |
47 </body> | 52 </body> |
48 </html> | 53 </html> |
OLD | NEW |