chromium/third_party/blink/web_tests/http/tests/security/cross-frame-access-dispatchEvent.html

<!DOCTYPE html>
<html>
<head>
    <script src="resources/cross-frame-access.js"></script>
    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.dumpChildFrames();
            testRunner.waitUntilDone();
        }

        receiver = function(e) {
            if (e.data == "LOADED")
                deleteTest();
        };

        var targetWindow;
        addEventListener('message', function () {
            targetWindow = document.querySelector('iframe').contentWindow;
            shouldThrowException('targetWindow.dispatchEvent(new CustomEvent("click"));');
            shouldThrowException('window.dispatchEvent.call(targetWindow, new CustomEvent("click"));');
            
            if (window.testRunner)
                testRunner.notifyDone();
        });

    </script>
</head>
<body>
    <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-delete-test.html"></iframe>
    <pre id="console"></pre>
</body>
</html>