blob: 4d7dd82b6e5eb7b18227e922bc9d87280450d4c6 [file] [log] [blame]
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.waitUntilDone();
}
addEventListener("message", function() {
// Call injected function.
try {
attack();
} catch (e) {
// V8 throws a TypeError: Cannot set property 'fail' of undefined.
}
// Post message to victim to check if it was accessed.
document.getElementById('theFrame').contentWindow.postMessage("test", "*");
}, false);
</script>
<body>
<p>Test cross-origin direct document access.</p>
<iframe id="theFrame" name="theFrame" src="resources/cross-frame-iframe-for-document-direct-test.html"></iframe>
</body>
</html>