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

Side by Side Diff: test/mjsunit/es6/debug-promises/throw-caught-by-default-reject-handler.js

Issue 473803003: Fix PromiseHasRejectHandler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updated comments Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --expose-debug-as debug --allow-natives-syntax 5 // Flags: --expose-debug-as debug --allow-natives-syntax
6 6
7 // Test debug events when we only listen to uncaught exceptions and 7 // Test debug events when we only listen to uncaught exceptions and
8 // there is a catch handler for the to-be-rejected Promise. 8 // there is only a default reject handler for the to-be-rejected Promise.
9 // We expect an Exception debug event with a promise to be triggered. 9 // We expect two Exception debug events:
10 // - when the first Promise is rejected and only has default reject handlers.
11 // - when the default reject handler passes the rejection on.
10 12
11 Debug = debug.Debug; 13 Debug = debug.Debug;
12 14
13 var expected_events = 2; 15 var expected_events = 2;
14 var log = []; 16 var log = [];
15 17
16 var resolve, reject; 18 var resolve, reject;
17 var p0 = new Promise(function(res, rej) { resolve = res; reject = rej; }); 19 var p0 = new Promise(function(res, rej) { resolve = res; reject = rej; });
18 var p1 = p0.then(function() { 20 var p1 = p0.then(function() {
19 log.push("p0.then"); 21 log.push("p0.then");
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 78 }
77 } 79 }
78 80
79 // Run testDone through the Object.observe processing loop. 81 // Run testDone through the Object.observe processing loop.
80 var dummy = {}; 82 var dummy = {};
81 Object.observe(dummy, checkResult); 83 Object.observe(dummy, checkResult);
82 dummy.dummy = dummy; 84 dummy.dummy = dummy;
83 } 85 }
84 86
85 testDone(0); 87 testDone(0);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698