blob: 85ab9be7b72d4e7cb11040ece66d340f10030fc6 [file] [log] [blame]
<html>
<body>
<p>This tests that a javascript: URL loaded in an iframe inside another javascript: URL loaded iframe has access to the main frame.</p>
<iframe id="aFrame" name='aFrame' style="width: 500px; height: 300px;"></iframe>
<p id='accessMe'>FAIL: Cross frame access from a javascript: URL inside another javascript: URL was denied.</p>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
}
var innerURL = 'javascript:\\\"<html>'
+ "<scr" + "ipt>"
+ 'top.document.getElementById(\\\\\\\"accessMe\\\\\\\").innerHTML = \\\\\\\"PASS: Cross frame access from a javascript: URL inside another javascript: URL was allowed!\\\\\\\";'
+ "</scri" + "pt>"
+ "<body>"
+ "<p>Inner-inner iframe.</p>"
+ "</body>"
+ '</html>\\\"';
var url = "javascript:\"<html>"
+ "<body>"
+ "<iframe src='" + innerURL + "'></iframe>"
+ "<p>Inner iframe.</p>"
+ "</body>"
+ "</html>\"";
var iframe = document.getElementById("aFrame");
iframe.src = url;
</script>
</body>
</html>