3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
8 allow_uncaught_exception
: true
10 async_test(function(t
) {
11 var e
= new Error('e');
12 var e2
= new Error('e2');
13 window
.onerror = function (msg
, url
, line
, col
, error
) {
15 assert_equals(msg
, 'Uncaught Error: e2');
16 assert_equals(error
, e2
);
20 window
.onrejectionhandled = function() {
23 var p
= Promise
.reject(e
);
24 setTimeout(function() {
26 p
.catch(function() {});
28 assert_unreached('attaching a handler should not throw an error');
31 }, 'Throwing inside an unhandledrejection handler invokes the error handler.');