blob: a5a1fd3678f8f56dcf2a5a0d0fda363b979fbb7d [file] [log] [blame]
<html>
<body>
<p>Frame on a foreign domain (opened using window.open).</p>
<iframe id="aFrame"></iframe>
<script>
var url = "data:text/html,<html>"
+ "<head>"
+ "<scr" + "ipt>"
+ "window.onload = function()"
+ "{"
+ "try {"
+ "parent.opener.document.getElementById('accessMe').innerHTML = 'FAIL: Cross frame access from a data: URL on a different domain was allowed';"
+ "alert('FAIL: No exception thrown.');"
+ "} catch (e) {"
+ "alert('PASS: Exception thrown successfully.');"
+ "}"
+ "window.parent.opener.postMessage('done', '*');"
+ "}"
+ "</scri" + "pt>"
+ "</head>"
+ "<body>"
+ "<p>Inner-inner iframe. This iframe (which is data: URL and whose parent is on a foreign domain) is the frame attempting to access"
+ " the main frame. It should not have access to it.</p>"
+ "</body>"
+ "</html>";
var frame = document.getElementById('aFrame');
frame.src = url;
</script>
</body>
</html>