63674d460587f3c5f695ab7ffa782bb35e9f5b6c
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / frame-length-overflow.html
1 <html>
2 <head>
3 <link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
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>
10 description("Make sure WebSocket does not crash and report error when it sees length overflow");
11
12 window.jsTestIsAsync = true;
13
14 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/frame-length-overflow");
15 ws.onopen = function () {
16     debug("WebSocket is open");
17 };
18 ws.onmessage = function (evt) {
19     debug("WebSocket received:" + evt.data);
20 };
21 ws.onerror = function () {
22     debug("WebSocket received error frame");
23 };
24 ws.onclose = function () {
25     debug("WebSocket is closed");
26     finishJSTest();
27 };
28
29 var successfullyParsed = true;
30 </script>
31 <script src="../../../js-test-resources/js-test-post.js"></script>
32 </body>
33 </html>