tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / http / tests / websocket / tests / hybi / long-control-frame.html
1 <!DOCTYPE HTML>
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>
10 description("Test whether WebSocket rejects control frames longer than 125 bytes.");
11
12 window.jsTestIsAsync = true;
13 if (window.layoutTestController)
14     layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
15
16 var url = "ws://localhost:8880/websocket/tests/hybi/long-control-frame";
17 var ws = new WebSocket(url);
18 var closeEvent;
19 var message;
20
21 ws.onopen = function()
22 {
23     debug("onopen() was called.");
24 };
25
26 ws.onclose = function(event)
27 {
28     closeEvent = event;
29     shouldBeFalse("closeEvent.wasClean");
30     finishJSTest();
31 };
32
33 </script>
34 <script src="../../../../js-test-resources/js-test-post.js"></script>
35 </body>
36 </html>