blob: b356e6c6225231fe1f53859c0a7cd266a3c46397 [file] [log] [blame]
<html>
<body>
<p>The scenario for this test is that you have an iframe with content from a foreign domain. In that foreign content
is an iframe which loads a data: URL. This tests that the data: URL loaded iframe does not have access
to the main frame using top.document.</p>
<iframe id='aFrame' src="http://localhost:8000/security/dataURL/resources/foreign-domain-data-url-accessor-iframe.html" style="width: 400px; height:200px;"></iframe>
<p id='accessMe'>Pass: Cross frame access from a data: URL on a different domain was denied.</p>
<pre id="console"></pre>
<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 innerInnerFrame = innerFrame.frames[0];
if (!innerInnerFrame) {
setTimeout(test, 1);
return;
}
var flag = innerInnerFrame.frames[0];
if (!flag) {
setTimeout(test, 1);
return;
}
testDone = true;
if (window.layoutTestController)
layoutTestController.notifyDone();
}
</script>
</body>
</html>