tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / http / tests / websocket / tests / hybi / resources / close-on-unload-iframe.html
1 <html>
2 <head>
3 <script src="../../../../../js-test-resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <div id="description"></div>
7 <div id="console"></div>
8 <script type="text/javascript">
9 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/close-on-unload");
10 ws.onopen = function()
11 {
12     // send "socket1" to server, so that "socket1" will be broadcasted to web sockets connected to close-on-unload when this web socket is closed.
13     ws.send("socket1");
14 };
15 ws.onmessage = function(evt)
16 {
17     // "socket1" is received by server, so ready to unload this document.
18     parent.document.iframeReady(evt.data);
19 }
20 </script>
21 </body>
22 </html>