chromium/third_party/blink/web_tests/http/tests/security/cross-origin-window-open-exception.html

<!DOCTYPE html>
<html>
<head>
</head>
<body>
    <iframe src="http://localhost:8080/"></iframe>
    <script src="/js-test-resources/js-test.js"></script>
    <script>
        description("Cross-origin access to 'window.open' and 'window.opener' should throw a SecurityError.");

        window.jsTestIsAsync = true; 
        var frame = document.querySelector('iframe');
        window.onload = function () {
            shouldThrow("frame.contentWindow.open()", '"SecurityError: Failed to read a named property \'open\' from \'Window\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
            shouldThrow("frame.contentWindow.opener = 1;", '"SecurityError: Failed to set a named property \'opener\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
            finishJSTest();
        };
    </script>
</body>
</html>