blob: 431c032bdf78b4f6e16f0d9c5eef3f81c8b307b2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/recv.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
if (window.internals)
window.internals.settings.setTreatIPAddressAsDomain(true);
addEventListener("message", recv, false);
function test() {
var iframe = document.getElementById('child');
var win = iframe.contentWindow;
win.postMessage('Message from parent', '*');
win.postMessage('done', '*');
}
document.domain = "0.0.1";
</script>
<body>
<div>window.location.href = <script>document.write(window.location.href);</script></div>
<div>document.domain = <script>document.write(document.domain);</script></div>
<div><iframe src="http://localhost:8000/security/postMessage/resources/post-message-listener.html" id="child" width="800" height="300"
style="border: 1px solid black;" onload="test()">
</iframe></div>
<div id="result">waiting...</div>
</body>
</html>