OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="resources/cross-frame-access.js"></script> | 3 <script src="resources/cross-frame-access.js"></script> |
4 <script> | 4 <script> |
5 if (window.testRunner) { | 5 if (window.testRunner) { |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
8 } | 8 } |
9 | 9 |
10 // Set up listener for message from iframe | 10 // Set up listener for message from iframe |
11 addEventListener('message', function(event) { | 11 addEventListener('message', function(event) { |
12 if (event.data == "finishedLoad") | 12 if (event.data == "finishedLoad") |
13 doTest(); | 13 doTest(); |
14 }, false); | 14 }, false); |
15 | 15 |
16 | 16 |
17 doTest = function() | 17 doTest = function() |
18 { | 18 { |
19 targetWindow = document.getElementById("target").contentWindow; | 19 targetWindow = document.getElementById("target").contentWindow; |
20 | 20 |
21 shouldBeUndefined("Object.getPrototypeOf(targetWindow)"); | 21 shouldThrowException("Object.getPrototypeOf(targetWindow)"); |
22 | 22 |
23 if (window.testRunner) | 23 if (window.testRunner) |
24 testRunner.notifyDone(); | 24 testRunner.notifyDone(); |
25 } | 25 } |
26 </script> | 26 </script> |
27 </head> | 27 </head> |
28 <body> | 28 <body> |
29 <div>This tests that you can't get the prototype of the window object cross-
origin using Object.getPrototypeOf().</div> | 29 <div>This tests that you can't get the prototype of the window object cross-
origin using Object.getPrototypeOf().</div> |
30 <iframe id="target" src="http://localhost:8000/security/resources/cross-fram
e-iframe-for-object-getPrototypeOf-test.html"></iframe> | 30 <iframe id="target" src="http://localhost:8000/security/resources/cross-fram
e-iframe-for-object-getPrototypeOf-test.html"></iframe> |
31 <pre id="console"></pre> | 31 <pre id="console"></pre> |
32 </body> | 32 </body> |
33 </html> | 33 </html> |
OLD | NEW |