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

Side by Side Diff: test/inspector/debugger/caught-exception-from-framework-inside-async.js

Issue 2742843003: [inspector] merged IsSubjectToDebugging and IsBlackboxed and fixed issue (Closed)
Patch Set: addressed comments Created 3 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 InspectorTest.log('Async caught exception prediction and blackboxing.');
6
7 InspectorTest.addScript(`
8 function constructorThrow() {
9 return new Promise((resolve, reject) =>
10 Promise.resolve().then(() =>
11 reject("f") // Exception f
12 )
13 );
14 }
15
16 function dotCatch(producer) {
17 Promise.resolve(producer()).catch(() => {});
18 }
19 //# sourceURL=framework.js`);
20
21 InspectorTest.setupScriptMap();
22 (async function test() {
23 Protocol.Debugger.enable();
24 Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']});
25 Protocol.Debugger.setPauseOnExceptions({state: 'all'});
26 Protocol.Runtime.evaluate({expression: 'dotCatch(constructorThrow);'});
27 // Should break at this debugger statement, not at reject.
28 Protocol.Runtime.evaluate({expression: 'setTimeout(\'debugger;\', 0);'});
29 await waitPauseAndDumpLocation();
30 InspectorTest.completeTest();
31 })();
32
33 async function waitPauseAndDumpLocation() {
34 var message = await Protocol.Debugger.oncePaused();
35 InspectorTest.log('paused at:');
36 InspectorTest.logSourceLocation(message.params.callFrames[0].location);
37 return message;
38 }
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | test/inspector/debugger/caught-exception-from-framework-inside-async-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698