blob: 8b754489d289e37b2dffabb58fdeca3126f26aea [file] [log] [blame]
<html>
<head>
<script src="../resources/cross-frame-access.js"></script>
</head>
<body>
<p>This tests that the main frame can access the contents of an iframe that contains a javascript: URL loaded page</p>
<iframe id="aFrame" name="aFrame"></iframe>
<pre id="console"></pre>
<script>
var url = "javascript:\"<html><scr" + "ipt>onload = function() { parent.postMessage(\'LOADED\', \'*\'); } </scr" + "ipt><body><p id=\'accessMe\'></p><p>Inner iframe.</p></body></html>\"";
var iframeId ="aFrame";
var passMessage = "PASS: Cross frame access to a javascript: URL was allowed!";
var failMessage = "FAIL: Cross frame access to a javascript: URL was denied.";
canAccessFrame(url, iframeId, passMessage, failMessage);
</script>
</body>
</html>