blob: 327d9ce302efc920c2bbc796094a8f954f816231 [file] [log] [blame]
<html>
<body>
<p>This tests that a javascript: URL loaded in an iframe has access to its parent's frame</p>
<iframe id="aFrame" name="aFrame"></iframe>
<p id='accessMe'>FAIL: Cross frame access from a javascript: URL was denied.</p>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.waitUntilDone();
}
var url = "javascript:\"<html>"
+ "<scr" + "ipt>"
+ "parent.document.getElementById('accessMe').innerHTML = 'PASS: Cross frame access from a javascript: URL was allowed!';"
+ "</scri" + "pt>"
+ "<body>"
+ "<p>Inner iframe.</p>"
+ "</body>"
+ "</html>\"";
var iframe = document.getElementById("aFrame");
iframe.src = url;
onload = () => {
setTimeout(() => {
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}
</script>
</body>
</html>