chromium/third_party/blink/web_tests/http/tests/messaging/cross-domain-message-send.html

<!DOCTYPE html>

<html lang="en">
<head>
    <title>Cross-Doc Test</title>
</head>
<script type="text/javascript" charset="utf-8">

if (window.testRunner) {
    testRunner.waitUntilDone();
    testRunner.dumpAsText();
}

function postIt () {
    document.getElementById("receiver").contentWindow.postMessage("Something", "*");
}

function receiver(e) {
    document.getElementById("result").firstChild.data = e.data;   
    
    if (window.testRunner) {
        testRunner.notifyDone();
    }
}

addEventListener('message', receiver, false);

    
</script>
<body onload="postIt()">
    
    <iframe src="http://localhost:8000/messaging/resources/cross-domain-message-receive.html" id="receiver"></iframe>
    
    <div id="result">waiting...</div>
    
    
</body>
</html>