<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function recv(e) {
    var msg = 'Received message: data="' + e.data + '" origin="' + e.origin + '"';

    document.getElementById("result").firstChild.data = msg;

    if (window.testRunner)
        testRunner.notifyDone();
}

addEventListener("message", recv, false);

</script>
<base href="http://www.example.com/">
<body>
<div>window.location.href = <script>document.write(document.location.href);</script></div>
<div><iframe src="http://localhost:8000/security/postMessage/resources/javascript-post-message-sender.html"
  id="child" width="800" height="300" style="border: 1px solid black;">
</iframe></div>
<div id="result">waiting...</div>
</body>
</html>

