blob: 0b8e8a4e1d8fcadc63f717d728e1d2e7fdbfe74d [file] [log] [blame]
<!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] === undefined ? 'array: PASS ... ' : '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="&lt;script&gt;window.test='property: PASS ... ';window[20]='array: PASS ... ';&lt;/script&gt;" />
</body>
</html>