| Index: test/mjsunit/es6/debug-promises/reject-caught-by-default-reject-handler.js
|
| diff --git a/test/mjsunit/es6/debug-promises/reject-caught-by-default-reject-handler.js b/test/mjsunit/es6/debug-promises/reject-caught-by-default-reject-handler.js
|
| index cd13dbf9d2c5a720a3edc5219d5afa83209890ab..6cd28259e1498af679dd7305eca2543ba41df1e7 100644
|
| --- a/test/mjsunit/es6/debug-promises/reject-caught-by-default-reject-handler.js
|
| +++ b/test/mjsunit/es6/debug-promises/reject-caught-by-default-reject-handler.js
|
| @@ -6,13 +6,13 @@
|
|
|
| // Test debug events when we only listen to uncaught exceptions and
|
| // there is only a default reject handler for the to-be-rejected Promise.
|
| -// We expect two Exception debug events:
|
| -// - when the first Promise is rejected and only has default reject handlers.
|
| -// - when the default reject handler passes the rejection on.
|
| +// We expect only one debug event: when the first Promise is rejected
|
| +// and only has default reject handlers. No event is triggered when
|
| +// simply forwarding the rejection with .then's default handler.
|
|
|
| Debug = debug.Debug;
|
|
|
| -var expected_events = 2;
|
| +var expected_events = 1;
|
| var log = [];
|
|
|
| var resolve, reject;
|
| @@ -43,15 +43,9 @@ function listener(event, exec_state, event_data, data) {
|
| assertTrue(expected_events >= 0);
|
| assertTrue(event_data.uncaught());
|
| assertTrue(event_data.promise() instanceof Promise);
|
| - if (expected_events == 1) {
|
| - // p1 is rejected, uncaught, with the error from the Promise.reject line
|
| - assertNotNull(event_data.sourceLineText().match("Promise.reject"));
|
| - assertSame(p1, event_data.promise());
|
| - } else {
|
| - // p2 is rejected by p1's default reject handler.
|
| - assertEquals(0, exec_state.frameCount());
|
| - assertSame(p2, event_data.promise());
|
| - }
|
| + // p1 is rejected, uncaught, with the error from the Promise.reject line
|
| + assertNotNull(event_data.sourceLineText().match("Promise.reject"));
|
| + assertSame(p1, event_data.promise());
|
| }
|
| } catch (e) {
|
| %AbortJS(e + "\n" + e.stack);
|
|
|