4 <script src=
"/js-test-resources/js-test.js"></script>
7 <iframe src=
"http://localhost:8080/security/resources/innocent-victim.html"></iframe>
9 window
.jsTestIsAsync
= true;
10 description("Certain window properties are readable cross-origin, but ought not be writable.");
13 window
.onload = function () {
14 iWindow
= document
.querySelector('iframe').contentWindow
;
16 var ex
= '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."';
18 // 'DoNotCheckSecurity' methods.
19 var DoNotCheckSecurityMethods
= [
26 for (var i
= 0; i
< DoNotCheckSecurityMethods
.length
; i
++) {
27 shouldThrow('iWindow.' + DoNotCheckSecurityMethods
[i
] + ' = function () {};', ex
);
30 // 'Replacable' properties (not an exhaustive list).
31 var ReplaceableProperties
= [
61 for (var i
= 0; i
< ReplaceableProperties
.length
; i
++) {
62 shouldThrow('iWindow.' + ReplaceableProperties
[i
] + ' = 1;');