Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encodi...
[WebKit-https.git] / LayoutTests / fast / dom / Window / window-collection-length-no-crash.html
1 <html>
2 <head></head>
3 <body>
4 <p id="description"></p>
5 <br>
6 <iframe id="subframe"></iframe>
7 <br>
8 This tests that window.frames.length does not crash the browser after the
9 frame navigates away from the current page. You should see "SUCCESS" below
10 once the test completes.
11 <br>
12 <div id="status">Test in progress...</div>
13
14 <script>
15 if (window.testRunner) {
16     window.testRunner.dumpAsText();
17     window.testRunner.waitUntilDone();
18 }
19
20 var myFrames = subframe.frames;
21
22 function done() {
23     var foo = myFrames.length;
24     document.getElementById("status").innerText = "SUCCESS";
25     if (window.testRunner)
26         window.testRunner.notifyDone();
27 }
28
29 subframe.document.location = "resources/notify-parent-done.html";
30 </script>
31 </body>
32 </html>