blob: 0a39676d1e2c3a5467cf5f47e5d1179e08c41872 [file] [log] [blame]
<html>
<head>
<script>
function runTest() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var frame = document.getElementById('theFrame');
if (!frame.contentDocument)
return;
var text = frame.contentDocument.getElementById('text');
if (!text)
return;
if (text.innerText != 'This text comes from the hidden iframe')
return;
if (window.frames.length != 1)
return;
if (window.frames[0].document != frame.contentDocument)
return;
document.getElementById('result').innerText = 'SUCCESS';
}
</script>
</head>
<body onload="runTest()">
<iframe id="theFrame" style="display:none" src="resources/iframe-display-none-child.html"></iframe>
This tests that a hidden iframe (with display set to none) can still be accessed using JavaScript.
<div id="result">SUCCESS</div>
</body>
</html>