Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: LayoutTests/fast/events/window-onerror-isolatedworld-02.html

Issue 20351002: Add 'error' parameter to 'window.onerror' handlers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Constructor. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/window-onerror-isolatedworld-02.html
diff --git a/LayoutTests/fast/events/window-onerror-isolatedworld-02.html b/LayoutTests/fast/events/window-onerror-isolatedworld-02.html
index e502a93eaa63dd8355d9fcad52dbce95869959fa..85a43a6c9bf4545908145e1dcc47f32735e68af8 100644
--- a/LayoutTests/fast/events/window-onerror-isolatedworld-02.html
+++ b/LayoutTests/fast/events/window-onerror-isolatedworld-02.html
@@ -42,14 +42,22 @@
document.getElementById("console").appendChild(record);
}
- window.onerror = function(msg, url, line) {
- log(isolatedWorld + " window.onerror: " + msg + " at " + lastUrlComponent(url) + ":" + line, "*");
+ window.onerror = function(msg, url, line, column, error) {
+ log(isolatedWorld + " window.onerror: " + msg + " at " + lastUrlComponent(url) + ", Line: " + line + ", Column: " + column, "*");
+ if (error)
+ log("Error object present!");
+ else
+ log("No error object present!");
return true;
}
window.addEventListener("error", function(e) {
var url = lastUrlComponent(e.filename);
- log(isolatedWorld + " error event listener: " + e.message + " at " + url + ":" + e.lineno, "*");
+ log(isolatedWorld + " error event listener: " + e.message + " at " + url + ":, Line: " + e.lineno, "*");
+ if (e.error)
+ log("Error object present!");
+ else
+ log("No error object present!");
e.preventDefault();
}, false);
};

Powered by Google App Engine
This is Rietveld 408576698