62463849e3f9d4b70c9c1645e1bde2e6ed7afcb8
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hybi / bad-handshake-crash.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../../js-test-resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <div id="description"></div>
8 <div id="console"></div>
9 <script type="text/javascript">
10 description("Make sure WebSocket doesn't crash with bad handshake message.");
11
12 window.jsTestIsAsync = true;
13 if (window.testRunner)
14     testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
15
16 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/bad-handshake-crash");
17 ws.onopen = function () {
18     debug("WebSocket is open");
19 };
20 ws.onclose = function () {
21     debug("WebSocket is closed");
22     finishJSTest();
23 };
24
25 </script>
26 <script src="../../../../js-test-resources/js-test-post.js"></script>
27 </body>
28 </html>