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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/constructors/promise-rejection-event-constructor.html

Issue 1471283002: Update PromiseRejectionEvent IDL to match latest spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/constructors/promise-rejection-event-constructor.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/constructors/promise-rejection-event-constructor.html b/third_party/WebKit/LayoutTests/fast/events/constructors/promise-rejection-event-constructor.html
index f1649a2d4446cbadacb09d3d69fa69c895109980..6c05c63d21ae81332a884faf70b2ed118930e7c0 100644
--- a/third_party/WebKit/LayoutTests/fast/events/constructors/promise-rejection-event-constructor.html
+++ b/third_party/WebKit/LayoutTests/fast/events/constructors/promise-rejection-event-constructor.html
@@ -8,17 +8,17 @@
test(function() {
var p = new Promise(function(resolve, reject) {});
- // No initializer is passed.
- assert_equals(new PromiseRejectionEvent('eventType').bubbles, false);
- assert_equals(new PromiseRejectionEvent('eventType').cancelable, false);
- assert_equals(new PromiseRejectionEvent('eventType').promise, null);
- assert_equals(new PromiseRejectionEvent('eventType').reason, null);
+ // No custom options are passed (besides required promise).
+ assert_equals(new PromiseRejectionEvent('eventType', { promise: p }).bubbles, false);
+ assert_equals(new PromiseRejectionEvent('eventType', { promise: p }).cancelable, false);
+ assert_equals(new PromiseRejectionEvent('eventType', { promise: p }).promise, p);
+ assert_equals(new PromiseRejectionEvent('eventType', { promise: p }).reason, undefined);
// No promise is passed.
assert_throws(new TypeError(),
function() {
new PromiseRejectionEvent('eventType', { bubbles: false });
- },
+ },
'Cannot construct PromiseRejectionEventInit without promise');
// bubbles is passed.
@@ -29,9 +29,6 @@ test(function() {
assert_equals(new PromiseRejectionEvent('eventType', { cancelable: false, promise: p }).cancelable, false);
assert_equals(new PromiseRejectionEvent('eventType', { cancelable: true, promise: p }).cancelable, true);
- // promise is passed.
- assert_equals(new PromiseRejectionEvent('eventType', { promise: p }).promise, p);
-
// reason is passed.
var r = new Error();
assert_equals(new PromiseRejectionEvent('eventType', { promise: p, reason: r }).reason, r);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698