3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
7 async_test(function(t
) {
8 var e
= new Error('e');
9 var p
= Promise
.reject(e
);
11 window
.onunhandledrejection = function(evt
) {
13 assert_equals(evt
.promise
, p
);
14 assert_equals(evt
.reason
, e
);
16 var unreached
= t
.unreached_func('promise should not be fulfilled');
17 p
.then(unreached
, function(reason
) {
19 assert_equals(reason
, e
);
21 setTimeout(function() { t
.done(); }, 10);
25 window
.onrejectionhandled
= t
.unreached_func('rejectionhandled event should not be invoked');
26 }, 'Attaching a handler in unhandledrejection should not trigger rejectionhandled.');