WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
[WebKit-https.git] / LayoutTests / fast / loader / inner-iframe-loads-data-url-into-parent-on-unload-crash-async-delegate.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script>
5 if (window.testRunner) {
6     testRunner.dumpAsText();
7     testRunner.dumpChildFramesAsText();
8     testRunner.waitUntilDone();
9     if (testRunner.setShouldDecideNavigationPolicyAfterDelay)
10         testRunner.setShouldDecideNavigationPolicyAfterDelay(true);
11 }
12 var parentFrame = document.body.appendChild(document.createElement("iframe"));
13 parentFrame.src = "data:text/html,";
14
15 var childFrame = parentFrame.contentDocument.body.appendChild(document.createElement("iframe"));
16 childFrame.contentWindow.onunload = function () {
17     var link = parentFrame.contentDocument.createElement("a");
18     link.href = "data:text/html,PASS did not crash.<script>window.testRunner && window.testRunner.notifyDone()</" + "script>";
19     link.click(); // Navigates parentFrame
20 }
21 </script>
22 </body>
23 </html>