| OLD | NEW |
| 1 <script src="cross-frame-access.js"></script> | 1 <script src="cross-frame-access.js"></script> |
| 2 <body> | 2 <body> |
| 3 <div id=console></div> | 3 <pre id=console></pre> |
| 4 <script> | 4 <script> |
| 5 var parentWindow = window.parent; | 5 var parentWindow = window.parent; |
| 6 parentWindow.testFunction = function() | 6 parentWindow.testFunction = function() |
| 7 { | 7 { |
| 8 shouldBeFalse("canGet('parentWindow.location.href')"); | 8 shouldBeFalse("canGet('parentWindow.location.href')"); |
| 9 shouldBeTrue("accessThrowsException('parentWindow.location.href')"); |
| 9 if (window.testRunner) | 10 if (window.testRunner) |
| 10 testRunner.notifyDone(); | 11 testRunner.notifyDone(); |
| 11 } | 12 } |
| 12 var func = parentWindow.testFunction; | 13 var func = parentWindow.testFunction; |
| 13 document.domain = document.domain; // after this window.parent properties are in
accessible | 14 document.domain = document.domain; // after this window.parent properties are in
accessible |
| 14 func(); | 15 func(); |
| 15 </script> | 16 </script> |
| 16 | 17 |
| 17 | 18 |
| OLD | NEW |