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

Side by Side Diff: test/inspector/debugger/framework-precise-ranges.js

Issue 2633803002: [inspector] implemented blackboxing inside v8 (Closed)
Patch Set: addressed comments Created 3 years, 11 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 framework debugging with blackboxed ranges.');
6
7 InspectorTest.addScript(
8 `
9 function foo() {
10 return boo();
11 }
12 function boo() {
13 return 42;
14 }
15 function testFunction() {
16 foo();
17 }
18 //# sourceURL=test.js`,
19 7, 26);
20
21 InspectorTest.setupScriptMap();
22 Protocol.Debugger.onPaused(message => {
23 InspectorTest.logCallFrames(message.params.callFrames);
24 InspectorTest.log('');
25 Protocol.Debugger.stepInto();
26 });
27 var scriptId;
28 Protocol.Debugger.onScriptParsed(message => {
29 if (message.params.url === 'test.js') {
30 scriptId = message.params.scriptId;
31 }
32 });
33
34 Protocol.Debugger.enable()
35 .then(() => Protocol.Debugger.setBlackboxPatterns({patterns: ['expr\.js']}))
36 .then(() => InspectorTest.runTestSuite(testSuite));
37
38 var testSuite = [
39 function testEntireScript(next) {
40 testPositions([position(0, 0)]).then(next);
41 },
42 function testFooNotBlackboxed(next) {
43 testPositions([position(11, 0)]).then(next);
44 },
45 function testFooBlackboxed(next) {
46 testPositions([position(8, 0), position(10, 3)]).then(next);
47 },
48 function testBooPartiallyBlackboxed1(next) {
49 // first line is not blackboxed, second and third - blackboxed.
50 testPositions([position(12, 0)]).then(next);
51 },
52 function testBooPartiallyBlackboxed2(next) {
53 // first line is blackboxed, second - not, third - blackboxed.
54 testPositions([
55 position(11, 0), position(12, 0), position(13, 0)
56 ]).then(next);
57 },
58 function testBooPartiallyBlackboxed3(next) {
59 // first line is blackboxed, second and third - not.
60 testPositions([
61 position(11, 0), position(12, 0), position(14, 0)
62 ]).then(next);
63 }
64 ];
65
66 function testPositions(positions) {
67 schedulePauseOnNextStatement('', '');
68 return Protocol.Debugger
69 .setBlackboxedRanges({scriptId: scriptId, positions: positions})
70 .then(InspectorTest.logMessage)
71 .then(
72 () => Protocol.Runtime.evaluate(
73 {expression: 'testFunction()//# sourceURL=expr.js'}));
74 }
75
76 function position(line, column) {
77 return {lineNumber: line, columnNumber: column};
78 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/framework-break-expected.txt ('k') | test/inspector/debugger/framework-precise-ranges-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698