| <script src="/js-test-resources/js-test-pre.js"></script> |
| <script src="resources/cross-frame-access.js"></script> |
| window.onload = function() |
| setTimeout(pollForTest, 1); |
| log("To run the test, click the button below when the opened window finishes loading."); |
| var button = document.createElement("button"); |
| button.appendChild(document.createTextNode("Run Test")); |
| button.onclick = runTest; |
| document.body.appendChild(button); |
| if (!testRunner.globalFlag) { |
| setTimeout(pollForTest, 1); |
| function getCustomProperty(o) |
| window.targetWindow = frames[0]; |
| shouldThrowErrorName("getCustomProperty(targetWindow)", "SecurityError"); |
| shouldThrowErrorName("getCustomProperty(targetWindow)", "SecurityError"); |
| shouldThrowErrorName("getCustomProperty(targetWindow)", "SecurityError"); |
| <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> |
| <script src="/js-test-resources/js-test-post.js"></script> |