chromium/third_party/blink/web_tests/http/tests/security/xss-DENIED-window-index-assign.html

<script>
if (window.testRunner)
    testRunner.dumpAsText();

window[0] = {
    a: "1",
    f: function() {
        alert("FAIL: Child called parent.f()");
    }
};
</script>
<iframe src="javascript:try { alert(parent[0].a); } catch (e) { alert('PASS: Access to parent[0].a threw exception.'); } try { parent[0].f(); } catch (e) { alert('PASS: Access to parent[0].f() threw exception.'); }"></iframe><br>
This test passes if the access is forbidden.