Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / Window / orphaned-frame-access.html
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Null frame access tests</title>
5 <script src="../../../resources/js-test.js"></script>
6 <script>
7 description("This tests access to a window with a null frame. You should see \"PASS\" for each of the three tests below.");
8
9 window.jsTestIsAsync = true;
10 window.onload = function() {
11     if (window.testRunner) {
12         testRunner.dumpAsText();
13         testRunner.waitUntilDone();
14     }
15
16     var tag = document.getElementById('subframe');
17     var win = tag.contentWindow;
18     // remove the element so the window has a null frame
19     tag.parentNode.removeChild(tag);
20
21     // schedule to run after the frame is null
22     asyncGC(function() {
23         debug("missing property: " + (win.test || 'PASS'))
24         debug("missing array index: " + (win[20] || 'PASS'));
25         debug("missing interface object: " + (win.Comment || 'PASS'));
26         finishJSTest();
27     });
28 };
29 </script>
30 </head>
31 <body>
32 <iframe id="subframe" src="data:text/html,&lt;script&gt;window.test='FAIL ... ';window[20]='FAIL ... ';&lt;/script&gt;" />
33 </body>
34 </html>