chromium/third_party/blink/web_tests/http/tests/cookies/resources/post-cookies-onmessage.php

<!doctype html>
<script>

var from_http = <?php
echo json_encode($_COOKIE);
?>;

window.addEventListener("message", e => {
    e.source.postMessage({
        'http': from_http,
        'document': document.cookie
    }, "*");
});
</script>