| <html> |
| <head> |
| <script src="/js-test-resources/js-test.js"></script> |
| </head> |
| <body> |
| <div id="description"></div> |
| <div id="console"></div> |
| <script type="text/javascript"> |
| parent.document.childWebSocket = new WebSocket(parent.document.wsUrl); |
| |
| parent.document.childWebSocket.onopen = function() |
| { |
| // Send "socket1" to server, so that "socket1" will be broadcasted to |
| // WebSockets connected to close-on-unload when this web socket is closed. |
| parent.document.childWebSocket.send("socket1"); |
| }; |
| parent.document.childWebSocket.onmessage = function(evt) |
| { |
| // "socket1" is received by server, so ready to unload this document. |
| parent.document.iframeReady(evt.data); |
| }; |
| </script> |
| </body> |
| </html> |