OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="cross-frame-access.js"></script> | 3 <script src="cross-frame-access.js"></script> |
4 <script> | 4 <script> |
5 receiver = function(e) | 5 receiver = function(e) |
6 { | 6 { |
7 if (e.data == "deletingValuesComplete") | 7 if (e.data == "deletingValuesComplete") |
8 setCheck(); | 8 setCheck(); |
9 } | 9 } |
10 addEventListener('message', receiver, false); | 10 addEventListener('message', receiver, false); |
11 | 11 |
12 window.onload = function() | 12 window.onload = function() |
13 { | 13 { |
14 window.existingProperty = "test value"; | 14 window.existingProperty = "test value"; |
15 window[1] = "test value"; | 15 window[1] = "test value"; |
16 window.history.existingProperty = "test value"; | 16 window.history.existingProperty = "test value"; |
17 window.history[1] = "test value"; | 17 window.history[1] = "test value"; |
18 window.location.existingProperty = "test value"; | 18 window.location.existingProperty = "test value"; |
19 window.location[1] = "test value"; | 19 window.location[1] = "test value"; |
20 | 20 |
21 window.parent.postMessage("setValuesComplete", "*"); | 21 window.parent.postMessage("setValuesComplete", "*"); |
22 } | 22 } |
23 | 23 |
24 setCheck = function() | 24 setCheck = function() |
25 { | 25 { |
26 log("\n----- tests for deleting the properties of window, window.his
tory, and window.location cross-domain -----\n"); | 26 log("\n----- tests for deleting the properties of window, window.his
tory, and window.location cross-domain -----\n"); |
27 | 27 |
28 shouldBe("window.existingProperty", "'test value'"); | 28 shouldBe("window.existingProperty", "'test value'"); |
29 shouldBe("window[1]", "'test value'"); | 29 shouldBe("window[1]", "undefined"); |
30 shouldBe("window.history.existingProperty", "'test value'"); | 30 shouldBe("window.history.existingProperty", "'test value'"); |
31 shouldBe("window.history[1]", "'test value'"); | 31 shouldBe("window.history[1]", "'test value'"); |
32 shouldBe("window.location.existingProperty", "'test value'"); | 32 shouldBe("window.location.existingProperty", "'test value'"); |
33 shouldBe("window.location[1]", "'test value'"); | 33 shouldBe("window.location[1]", "'test value'"); |
34 | 34 |
35 if (window.testRunner) | 35 if (window.testRunner) |
36 testRunner.notifyDone(); | 36 testRunner.notifyDone(); |
37 } | 37 } |
38 </script> | 38 </script> |
39 </head> | 39 </head> |
40 <body> | 40 <body> |
41 <pre id="console"></pre> | 41 <pre id="console"></pre> |
42 </body> | 42 </body> |
43 </html> | 43 </html> |
OLD | NEW |