chromium/third_party/blink/web_tests/http/tests/devtools/sources/debugger/resources/post-message-listener.html

<!DOCTYPE html>
<html>
<body>
<script>
function onMessageReceivedInFrame(e) {
    var msg = 'Received message: data="' + e.data + '" origin="' + e.origin + '"';
    if (e.data !== "skip debugger") debugger;
    postMessageToParent(msg);
}

function postMessageToParent(msg)
{
    top.postMessage(msg, "*");
}

window.addEventListener("message", onMessageReceivedInFrame, false);
</script>
</body>
</html>