| testRunner.waitUntilDone(); |
| testRunner.setCanOpenWindows(); |
| testRunner.setCloseRemainingWindowsWhenComplete(true); |
| This passes if it doesn't alert the contents of innocent-victim. |
| window.onload = function() |
| frame = document.body.appendChild(document.createElement("iframe")); |
| frame.src = "http://localhost:8080/security/resources/innocent-victim-with-iframe.html"; |
| frame.onload = function() { |
| frame.contentWindow[0].location = "data:text/html,<script>(" + function() { |
| obj.__proto__.__proto__ = parent; |
| alert(obj.valueOf.constructor("return document.body.innerHTML")()); |
| console.log("Threw exception: " + ex) |