2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / dom / Window / window-closed-crash.html
blob984949816a449ad3fae72a14fec2f690eec132cd
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script type="text/javascript">
5 function log(msg)
7 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
9 </script>
10 </head>
11 <body>
12 <p>This tests that window.closed on a closed window, or window without a frame, does not crash the browser. See rdar://problem/5329841</p>
13 <pre id="console"></pre>
14 <iframe id="anIframe"></iframe>
15 <script>
16 if (window.layoutTestController)
17 layoutTestController.dumpAsText();
19 var win = window.frames[0];
20 document.body.removeChild(document.getElementById('anIframe'));
22 var c = win.closed;
23 log("Passed!");
24 </script>
25 </body>
26 </html>