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

Unified Diff: LayoutTests/fast/events/constructors/error-event-constructor.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
« no previous file with comments | « no previous file | LayoutTests/fast/events/constructors/error-event-constructor-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/constructors/error-event-constructor.html
diff --git a/LayoutTests/fast/events/constructors/error-event-constructor.html b/LayoutTests/fast/events/constructors/error-event-constructor.html
index a5313b26f658ce0c728902032f34da38194317f2..ccdc247f626b15f83d2cdb0d58243d048ed969df 100644
--- a/LayoutTests/fast/events/constructors/error-event-constructor.html
+++ b/LayoutTests/fast/events/constructors/error-event-constructor.html
@@ -105,13 +105,18 @@ shouldBe("new ErrorEvent('eventType', { colno: {} }).colno", "0");
shouldBe("new ErrorEvent('eventType', { colno: {moemoe: 12345} }).colno", "0");
shouldBe("new ErrorEvent('eventType', { colno: {valueOf: function () { return 12345; }} }).colno", "12345");
+// error is passed.
+shouldBe("new ErrorEvent('eventType', { error: { moemoe: 12345 } }).error.moemoe", "12345");
+shouldBeEqualToString("new ErrorEvent('eventType', { error: { message: 'Message' } }).error.message", "Message");
+
// All initializers are passed.
-shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).bubbles", "true");
-shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).cancelable", "true");
-shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).message", "sakuranbo");
-shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).filename", "amaenbo");
-shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).lineno", "12345");
-shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).colno", "23456");
+shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).bubbles", "true");
+shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).cancelable", "true");
+shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).message", "sakuranbo");
+shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).filename", "amaenbo");
+shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).lineno", "12345");
+shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).colno", "23456");
+shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).error.message", "hi");
</script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
« no previous file with comments | « no previous file | LayoutTests/fast/events/constructors/error-event-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698