Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1752)

Unified Diff: test/mjsunit/es6/debug-promises/promise-all-uncaught.js

Issue 2350363002: Make Promise.all/Promise.race catch prediction conditional on DevTools (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/promise.js ('k') | test/mjsunit/es6/debug-promises/promise-race-uncaught.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/debug-promises/promise-all-uncaught.js
diff --git a/test/mjsunit/es6/debug-promises/promise-all-uncaught.js b/test/mjsunit/es6/debug-promises/promise-all-uncaught.js
index fce2a5da5ada4094ec86ac6fb6cdab39276f2698..c201d13e053c5d59c4e6406497f0a3f46bbb7889 100644
--- a/test/mjsunit/es6/debug-promises/promise-all-uncaught.js
+++ b/test/mjsunit/es6/debug-promises/promise-all-uncaught.js
@@ -16,19 +16,6 @@ var Debug = debug.Debug;
var expected_events = 1;
var log = [];
-var p1 = Promise.resolve();
-p1.name = "p1";
-
-var p2 = p1.then(function() {
- log.push("throw");
- throw new Error("uncaught"); // event
-});
-
-p2.name = "p2";
-
-var p3 = Promise.all([p2]);
-p3.name = "p3";
-
function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Exception) return;
try {
@@ -48,6 +35,19 @@ function listener(event, exec_state, event_data, data) {
Debug.setBreakOnUncaughtException();
Debug.setListener(listener);
+var p1 = Promise.resolve();
+p1.name = "p1";
+
+var p2 = p1.then(function() {
+ log.push("throw");
+ throw new Error("uncaught"); // event
+});
+
+p2.name = "p2";
+
+var p3 = Promise.all([p2]);
+p3.name = "p3";
+
log.push("end main");
function testDone(iteration) {
« no previous file with comments | « src/js/promise.js ('k') | test/mjsunit/es6/debug-promises/promise-race-uncaught.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698