OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
5 <title>Null frame access tests</title> | 4 <title>Null frame access tests</title> |
| 5 <script src="../../../resources/js-test.js"></script> |
6 <script> | 6 <script> |
| 7 description("This tests access to a window with a null frame. You should see \"P
ASS\" for each of the three tests below."); |
| 8 |
| 9 window.jsTestIsAsync = true; |
7 window.onload = function() { | 10 window.onload = function() { |
8 if (window.testRunner) { | 11 if (window.testRunner) { |
9 testRunner.dumpAsText(); | 12 testRunner.dumpAsText(); |
10 testRunner.waitUntilDone(); | 13 testRunner.waitUntilDone(); |
11 } | 14 } |
12 | 15 |
13 var tag = document.getElementById('subframe'); | 16 var tag = document.getElementById('subframe'); |
14 var win = tag.contentWindow; | 17 var win = tag.contentWindow; |
15 // remove the element so the window has a null frame | 18 // remove the element so the window has a null frame |
16 tag.parentNode.removeChild(tag); | 19 tag.parentNode.removeChild(tag); |
17 | 20 |
18 // schedule to run after the frame is null | 21 // schedule to run after the frame is null |
19 setTimeout(function() { | 22 asyncGC(function() { |
20 document.body.appendChild(document.createTextNode(win.test || 'property:
PASS ... ')); | 23 debug("missing property: " + (win.test || 'PASS')) |
21 document.body.appendChild(document.createTextNode(win[20] || 'array: PAS
S ... ')); | 24 debug("missing array index: " + (win[20] || 'PASS')); |
22 document.body.appendChild(document.createTextNode(win.Comment || 'missin
g property: PASS.')); | 25 debug("missing interface object: " + (win.Comment || 'PASS')); |
23 if (window.testRunner) | 26 finishJSTest(); |
24 testRunner.notifyDone(); | 27 }); |
25 }, 0); | |
26 }; | 28 }; |
27 </script> | 29 </script> |
28 </head> | 30 </head> |
29 <body> | 31 <body> |
30 This tests access to a window with a null frame. You should see "PASS" for each
of the three tests below.<br /><br /> | |
31 <iframe id="subframe" src="data:text/html,<script>window.test='FAIL ... ';
window[20]='FAIL ... ';</script>" /> | 32 <iframe id="subframe" src="data:text/html,<script>window.test='FAIL ... ';
window[20]='FAIL ... ';</script>" /> |
32 </body> | 33 </body> |
33 </html> | 34 </html> |
OLD | NEW |