<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.