<html>
<body>
    <p>Target Child</p>
    <script>
        window.parent.frames[1].XHR.addEventListener("load", function() {
            try {
                alert("document.domain: " + window.document.domain);
            } catch(e) {
                alert(e);
            }
            dispatchEvent(new Event("foo")); // no-op, shouldn't throw
        }, false);

        window.location = "http://localhost:8000/security/resources/cross-frame-iframe.html";
    </script> 
</body>
</html>
