Index: LayoutTests/fast/events/window-onerror-for-isolated-world-1.html |
diff --git a/LayoutTests/fast/events/window-onerror-for-isolated-world-1.html b/LayoutTests/fast/events/window-onerror-for-isolated-world-1.html |
deleted file mode 100644 |
index af4b00507a91811dd3204632da15d5d06e0c654f..0000000000000000000000000000000000000000 |
--- a/LayoutTests/fast/events/window-onerror-for-isolated-world-1.html |
+++ /dev/null |
@@ -1,68 +0,0 @@ |
-<!DOCTYPE HTML> |
-<html> |
-<head> |
-</head> |
-<body> |
-<p>Test that window.onerror and "error" event listeners from main world are |
-invoked for uncaught exceptions in scripts running in isolate worlds as |
-well as for exceptions in the main world.<a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519.</a> |
-</p> |
-<div id="console"></div> |
-<script> |
- |
-var expectedRecordCount = 12; |
-var recordCount = 0; |
-document.getElementById("console").addEventListener("DOMNodeInserted", function(e) { |
- recordCount++; |
- if (recordCount === expectedRecordCount && window.testRunner) |
- testRunner.notifyDone(); |
-}, false); |
- |
-function log(msg) { |
- var record = document.createElement("div"); |
- record.innerHTML = msg; |
- document.getElementById("console").appendChild(record); |
-} |
- |
-function lastUrlComponent(url) { |
- return url ? url.match( /[^\/]+\/?$/ )[0] : url; |
-} |
- |
-window.onerror = function(msg, url, line) |
-{ |
- log("Main world window.onerror: " + msg + " at " + lastUrlComponent(url) + ":" + line); |
- return true; |
-} |
- |
-window.addEventListener("error", function(e) |
-{ |
- var url = lastUrlComponent(e.filename); |
- log("Main world error event listener: " + e.message + " at " + url + ":" + e.lineno); |
- e.preventDefault(); |
-}, false); |
- |
-var exceptions = function(isolatedWorld) |
-{ |
- window.addEventListener("load", function(e) { |
- // Do the following call from load listener to make sure error in the setTimeout callback always happens after the error in this listener. |
- setTimeout(function() { |
- throw new Error("Error in " + isolatedWorld + " setTimeout callback."); |
- }, 0); |
- throw new Error("Error in " + isolatedWorld + " load handler."); |
- }, false); |
- |
- |
- throw new Error("Error in "+ isolatedWorld + " inline script."); |
-} |
- |
-if (window.testRunner) { |
- testRunner.dumpAsText(); |
- testRunner.waitUntilDone(); |
- testRunner.evaluateScriptInIsolatedWorld(1, "(" + exceptions + ")('isolated world')"); |
-} |
- |
-exceptions("main world"); |
- |
-</script> |
-</body> |
-</html> |