Index: test/mjsunit/es6/debug-promises-throw-in-reject.js |
diff --git a/test/mjsunit/es6/debug-promises-throw-in-reject.js b/test/mjsunit/es6/debug-promises-throw-in-reject.js |
index cdf759606c68a2c152d0ac50d5ce982ac2872ef8..6ae064dcd291d9bdd22d3eedf8ef1b417564ac65 100644 |
--- a/test/mjsunit/es6/debug-promises-throw-in-reject.js |
+++ b/test/mjsunit/es6/debug-promises-throw-in-reject.js |
@@ -6,7 +6,7 @@ |
// Test debug events when an exception is thrown inside a Promise, which is |
// caught by a custom promise, which throws a new exception in its reject |
-// handler. We expect an Exception debug event with a promise to be triggered. |
+// handler. We expect a PendingExceptionInPromise event to be triggered. |
Debug = debug.Debug; |
@@ -21,7 +21,7 @@ var p = new Promise(function(resolve, reject) { |
function MyPromise(resolver) { |
var reject = function() { |
log.push("throw reject"); |
- throw new Error("reject"); // event |
+ throw new Error("reject"); |
}; |
var resolve = function() { }; |
log.push("construct"); |
@@ -39,12 +39,12 @@ var q = p.chain( |
function listener(event, exec_state, event_data, data) { |
try { |
- if (event == Debug.DebugEvent.Exception) { |
+ if (event == Debug.DebugEvent.PendingExceptionInPromise) { |
assertEquals(["resolve", "construct", "end main", |
"throw caught", "throw reject"], log); |
- assertEquals("reject", event_data.exception().message); |
- assertEquals(q, event_data.promise()); |
- assertTrue(exec_state.frame(0).sourceLineText().indexOf('// event') > 0); |
+ assertEquals("caught", event_data.exception().message); |
+ } else if (event == Debug.DebugEvent.Exception) { |
+ assertUnreachable(); |
} |
} catch (e) { |
// Signal a failure with exit code 1. This is necessary since the |