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 rejects frames whose reserved bit is on."); | 10 description("Test whether WebSocket rejects frames whose reserved bit is on."); |
(...skipping 29 matching lines...) Expand all Loading... |
40 ws.onclose = function(event) | 40 ws.onclose = function(event) |
41 { | 41 { |
42 debug("onclose() was called."); | 42 debug("onclose() was called."); |
43 closeEvent = event; | 43 closeEvent = event; |
44 shouldBeFalse("closeEvent.wasClean"); | 44 shouldBeFalse("closeEvent.wasClean"); |
45 if (curTestIndex === compressedAndBitNumberParameters.length - 1) | 45 if (curTestIndex === compressedAndBitNumberParameters.length - 1) |
46 finishJSTest(); | 46 finishJSTest(); |
47 else | 47 else |
48 doTest(curTestIndex + 1); | 48 doTest(curTestIndex + 1); |
49 }; | 49 }; |
| 50 |
| 51 ws.onerror = function(errorEvent) |
| 52 { |
| 53 testPassed("onerror() was called"); |
| 54 }; |
50 } | 55 } |
51 | 56 |
52 doTest(0); | 57 doTest(0); |
53 | 58 |
54 </script> | 59 </script> |
55 </body> | 60 </body> |
56 </html> | 61 </html> |
OLD | NEW |