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

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

Issue 1416163003: Reland "Don't report promise rejection events during the microtask checkpoint" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: 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.

Powered by Google App Engine
This is Rietveld 408576698