2011-07-05 Yuta Kitamura <yutak@chromium.org>
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hixie76 / reload-crash.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("Test if it doesn't crash when reloading while Web Socket is busy");
12
13 window.jsTestIsAsync = true;
14
15 var frameDiv;
16 var reloadCount = 0;
17
18 document.iframeReady = function ()
19 {
20     if (reloadCount == 0)
21        debug("PASS iframe is ready.");
22     if (reloadCount == 1) {
23        debug("PASS reloaded iframe while WebSocket is busy");
24        finishJSTest();
25        return;
26     }
27     reloadCount += 1;
28 };
29
30 frameDiv = document.createElement("iframe");
31 frameDiv.src = "resources/reload-crash-iframe.html";
32 document.body.appendChild(frameDiv);
33 debug("PASS insert a iframe");
34
35 var successfullyParsed = true;
36 </script>
37 <script src="../../../../js-test-resources/js-test-post.js"></script>
38 </body>
39 </html>