| <html> |
| <head> |
| <script src="resources/cross-frame-access.js"></script> |
| <script> |
| window.onload = function() |
| { |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| window.targetWindow = frames[0]; |
| |
| shouldBeTrue("customPropertyAccessThrowsException(targetWindow)"); |
| shouldBeTrue("customPropertyAccessThrowsException(targetWindow)"); |
| shouldBeTrue("customPropertyAccessThrowsException(targetWindow)"); |
| |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| function customPropertyAccessThrowsException(o) |
| { |
| try { |
| var x = o.customProperty; |
| return false; |
| } catch (e) { |
| return true; |
| } |
| } |
| </script> |
| </head> |
| <body> |
| <p>This test checks that caching of property accesses doesn't allow for illegal cross-frame access of a custom property. It also checks for an assertion failure that once occurred in this situation.</p> |
| <iframe src="http://localhost:8000/security/resources/cross-frame-access-get-custom-property-cached-iframe.html" style=""></iframe> |
| <pre id="console"></pre> |
| </body> |
| </html> |