c61f427143c8e406d45175b4782ef10a9eb29f18
[WebKit-https.git] / LayoutTests / http / tests / appcache / deferred-events-delete-while-raising.html
1 <html manifest="THIS_FILE_DOES_NOT_EXIST.manifest">
2 <head>
3   <script src="THIS_FILE_DOES_NOT_EXIST.js" type="text/javascript"></script>
4   <script type="text/javascript">
5     var isParentFrame = window == window.top;
6
7     if (isParentFrame) {
8         if (window.testRunner) {
9             testRunner.dumpAsText()
10             testRunner.waitUntilDone();
11         }
12
13         window.onmessage = function() {
14             document.getElementById('result').innerHTML = "SUCCESS";
15             if (window.testRunner)
16                 testRunner.notifyDone();
17         }
18     } else {
19         window.applicationCache.onchecking = function() {
20             parent.postMessage("hello", "*");
21             parent.killChildFrame();
22         }
23     }
24
25     function killChildFrame() {
26         document.body.removeChild(document.getElementsByTagName("iframe")[0]);
27     }
28   </script>
29 </head>
30 <body>
31 <p>Test the destruction of an iframe while deferred events are being raised does not crash the system.</p>
32 <div id="result">FAILURE</div>
33 <iframe src="deferred-events-delete-while-raising.html"></iframe>
34 </body>
35 </html>