Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: LayoutTests/fast/dom/null-page-show-modal-dialog-crash.html

Issue 174073007: Remove deprecated window.showModalDialog() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698