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