blob: fbfb440afc02ca7ee174d5e23d383c0620c272a5 [file] [log] [blame]
<html>
<head>
<script src="../resources/cross-frame-access.js"></script>
</head>
<body>
<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the subframe.</p>
<pre id='console'></pre>
<iframe id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.dumpChildFramesAsText();
layoutTestController.waitUntilDone();
}
var innerFrame = window.frames[0];
var testDone = false;
setTimeout(test, 1);
setTimeout(function() {
if (!testDone) {
log("FAIL: Test timed out");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
}, 2000);
function test() {
var flag = innerFrame.frames[0];
if (!flag) {
setTimeout(test, 1);
return;
}
document.getElementById('aFrame').setAttribute("src", 'javascript:"FAIL: this should not have been loaded."');
testDone = true;
if (window.layoutTestController)
layoutTestController.notifyDone();
}
</script>
</body>
</html>