| 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..33f3439a61801ba048b507986a3fe282db3d36c1 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
|
| @@ -6,35 +6,27 @@
|
| 'use strict';
|
|
|
| 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 promise is passed.
|
| - assert_throws(new TypeError(),
|
| - function() {
|
| - new PromiseRejectionEvent('eventType', { bubbles: false });
|
| - },
|
| - 'Cannot construct PromiseRejectionEventInit without promise');
|
| -
|
| // bubbles is passed.
|
| - assert_equals(new PromiseRejectionEvent('eventType', { bubbles: false, promise: p }).bubbles, false);
|
| - assert_equals(new PromiseRejectionEvent('eventType', { bubbles: true, promise: p }).bubbles, true);
|
| + assert_equals(new PromiseRejectionEvent('eventType', { bubbles: false }).bubbles, false);
|
| + assert_equals(new PromiseRejectionEvent('eventType', { bubbles: true }).bubbles, true);
|
|
|
| // cancelable is passed.
|
| - assert_equals(new PromiseRejectionEvent('eventType', { cancelable: false, promise: p }).cancelable, false);
|
| - assert_equals(new PromiseRejectionEvent('eventType', { cancelable: true, promise: p }).cancelable, true);
|
| + assert_equals(new PromiseRejectionEvent('eventType', { cancelable: false }).cancelable, false);
|
| + assert_equals(new PromiseRejectionEvent('eventType', { cancelable: true }).cancelable, true);
|
|
|
| // promise is passed.
|
| + var p = new Promise(function(resolve, reject) {});
|
| 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);
|
| + assert_equals(new PromiseRejectionEvent('eventType', { reason: r }).reason, r);
|
|
|
|
|
| // All initializers are passed.
|
|
|