[Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hixie76 / 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
14 if (window.layoutTestController)
15     layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
16
17 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/bad-handshake-crash");
18 ws.onopen = function () {
19     debug("WebSocket is open");
20 };
21 ws.onclose = function () {
22     debug("WebSocket is closed");
23     finishJSTest();
24 };
25
26 </script>
27 <script src="../../../../js-test-resources/js-test-post.js"></script>
28 </body>
29 </html>