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

Side by Side Diff: test/inspector/debugger/framework-nested-scheduled-break.js

Issue 2678313002: [inspector] support for nested scheduled breaks (Closed)
Patch Set: better test Created 3 years, 10 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 print('Checks nested scheduled break in framework code.');
6
7 InspectorTest.addScript(`
8 function frameworkCall(callback) {
9 callWithScheduledBreak(doFrameworkWork.bind(null, callback),
10 'top-framework-scheduled-break',
11 JSON.stringify({ data: 'data for top-framework-scheduled-break' }));
12 }
13
14 function doFrameworkWork(callback) {
15 callWithScheduledBreak(doFrameworkBreak, 'should-not-be-a-reason', '');
16 callback();
17 }
18
19 function doFrameworkBreak() {
20 breakProgram('framework-break', JSON.stringify({ data: 'data for framework-bre ak' }));
21 }
22
23 //# sourceURL=framework.js`, 7, 26);
24
25 InspectorTest.addScript(`
26 function testFunction() {
27 callWithScheduledBreak(frameworkCall.bind(null, callback),
28 'top-scheduled-break', '');
29 }
30
31 function callback() {
32 breakProgram('user-break', JSON.stringify({ data: 'data for user-break' }));
33 return 42;
34 }
35
36 //# sourceURL=user.js`, 25, 26);
37
38 InspectorTest.setupScriptMap();
39 Protocol.Debugger.onPaused(message => {
40 InspectorTest.log('break reason: ' + message.params.reason);
41 InspectorTest.log('break aux data: ' + JSON.stringify(message.params.data || { }, null, ' '));
42 InspectorTest.logCallFrames(message.params.callFrames);
43 InspectorTest.log('');
44 Protocol.Debugger.resume();
45 });
46 Protocol.Debugger.enable()
47 .then(() => Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js'] }))
48 .then(() => Protocol.Runtime.evaluate({ expression: 'testFunction()//# sourceU RL=expr.js'}))
49 .then(InspectorTest.completeTest);
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | test/inspector/debugger/framework-nested-scheduled-break-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698