| <p>Test that exceptions in iframe are not reported to the main frame window.onerror handler. |
| window.onerror should print exactly one line.</p> |
| testRunner.waitUntilDone(); |
| document.getElementById("result").innerHTML += msg + "<br>"; |
| window.onerror = function(msg, url, line, column, error) |
| url = url ? url.match( /[^\/]+\/?$/ )[0] : url; |
| log("Main frame window.onerror: " + msg + " at " + url + ":" + line + ":" + column + " " + error); |
| function receiveMessage(event) { |
| if (event.data === "IFrameLoaded") { |
| log("FAIL " + event.data); |
| window.addEventListener("message", receiveMessage, false); |
| throw "MainFrameException"; |
| <iframe src="http://localhost:8000/security/resources/onerror-iframe.html"/> |