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

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

            window.targetWindow = frames[0];

            log("----- tests for getting a targetWindow's functions which have custom overrides.  The desired " +
                " behavior is for the targetWindow to return the built-in function, not the override -----\n");

            // Overriden using window.focus = function() { return "new focus" }
            shouldBeTrue("canGet('targetWindow.focus')");
            shouldBe("toString('targetWindow.focus')", "toString('window.focus')");

            // Overriden using window.__proto__.blur = function() { return "new blur;" }
            shouldBeTrue("canGet('targetWindow.blur')");
            shouldBe("toString('targetWindow.blur')", "toString('window.blur')");

            // Overriden using window.history.close = "new close"
            shouldBeTrue("canGet('targetWindow.close')");
            shouldBe("toString('targetWindow.close')", "toString('window.close')");

            if (window.testRunner)
                testRunner.notifyDone();
        }
    </script>
</head>
<body>
<iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get-override-test.html"></iframe>
<pre id="console"></pre>
</body>
</html>