359ceb20038e8708f48224b1b3c92a611a5ed0e4
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / long-invalid-header.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
5 <script src="../../../js-test-resources/js-test-pre.js"></script>
6 </head>
7 <body>
8 <div id="description"></div>
9 <div id="console"></div>
10 <script type="text/javascript">
11 description("Make sure WebSocket gives errors on long invalid upgrade header.");
12
13 window.jsTestIsAsync = true;
14
15 function finish() {
16     clearTimeout(timeoutID);
17     finishJSTest();
18 }
19
20 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/long-invalid-header");
21 ws.onopen = function () {
22     debug("WebSocket is open");
23 };
24 ws.onclose = function () {
25     debug("WebSocket is closed");
26     finish();
27 };
28 var timeoutID = setTimeout("finish()", 2000);
29
30 var successfullyParsed = true;
31 </script>
32 <script src="../../../js-test-resources/js-test-post.js"></script>
33 </body>
34 </html>