6c1e18f36a2f07f93df044db57ed8859d531d60c
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hybi / long-invalid-header.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 gives errors on long invalid upgrade header.");
11
12 window.jsTestIsAsync = true;
13 if (window.testRunner)
14     testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
15
16 function finish() {
17     clearTimeout(timeoutID);
18     finishJSTest();
19 }
20
21 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/long-invalid-header");
22 ws.onopen = function () {
23     debug("WebSocket is open");
24 };
25 ws.onclose = function () {
26     debug("WebSocket is closed");
27     finish();
28 };
29 var timeoutID = setTimeout("finish()", 2000);
30
31 </script>
32 <script src="../../../../js-test-resources/js-test-post.js"></script>
33 </body>
34 </html>