chromium/third_party/blink/web_tests/fast/dom/Document/resources/early-document-access-popup.html

<html>
<head>
    <script>
    function test() {
        if (document.body.getAttribute('test') == 'pass')
            window.opener.pass();
        else
            window.opener.fail();
    }
    </script>
</head>
<body onload="test()" test="pass"></body>
</html>