blob: f4a1f2fb77f7ba79698924aa69f4b373d1634951 [file] [log] [blame]
promise_test(() => {
return new Promise(resolve => {
var promise = null;
self.addEventListener('unhandledrejection', ev => {
assert_equals(ev.type, "unhandledrejection");
assert_equals(ev.cancelable, true);
assert_equals(ev.promise, promise);
assert_equals(ev.reason, "Reject");
resolve();
return false;
}, false);
promise = Promise.reject("Reject");
});
}, "UnhandledRejection event occurs if a rejected promise is not handled.");