OLD | NEW |
| (Empty) |
1 This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19541">https
://bugs.webkit.org/show_bug.cgi?id=19541</a> | |
2 RBug 19541: Null pointer in showModalDialog() | |
3 | |
4 This tests calling the showModalDialog() function on a window object from a deta
ched iframe, both calling the saved showModalDialog() function and getting the p
roperty again after the iframe has been detached. | |
5 | |
6 If there is no crash this test passes. | |
7 <script type="text/javascript"> | |
8 if (window.testRunner) | |
9 testRunner.dumpAsText(); | |
10 | |
11 var iframe = document.createElement("iframe"); | |
12 | |
13 iframe.onload = function() { | |
14 var iframeWindow = iframe.contentWindow; | |
15 var f = iframeWindow.showModalDialog; | |
16 | |
17 iframe.parentNode.removeChild(iframe); | |
18 if (iframeWindow.showModalDialog) | |
19 iframeWindow.showModalDialog(); | |
20 if (f) | |
21 f.call(iframeWindow); | |
22 }; | |
23 | |
24 document.body.appendChild(iframe); | |
25 </script> | |
OLD | NEW |