| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>Null frame access tests</title> |
| <script> |
| window.onload = function() { |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var tag = document.getElementById('subframe'); |
| var win = tag.contentWindow; |
| // remove the element so the window has a null frame |
| tag.parentNode.removeChild(tag); |
| |
| // schedule to run after the frame is null |
| setTimeout(function() { |
| document.body.appendChild(document.createTextNode(win.test || 'property: FAIL ... ')); |
| document.body.appendChild(document.createTextNode(win[20] || 'array: FAIL ... ')); |
| document.body.appendChild(document.createTextNode(win.Comment ? 'constructor: PASS .... ' : 'constructor: FAIL ... ')); |
| document.body.appendChild(document.createTextNode(win.postMessage ? 'operation: PASS.' : 'operation: FAIL.')); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 0); |
| }; |
| </script> |
| </head> |
| <body> |
| This tests access to a window with a null frame. You should see "PASS" for each of the three tests below.<br /><br /> |
| <iframe id="subframe" srcdoc="<script>window.test='property: PASS ... ';window[20]='array: PASS ... ';</script>" /> |
| </body> |
| </html> |