OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 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 | 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 InspectorTest.log('Checks framework debugging with blackboxed ranges.'); | 5 InspectorTest.log('Checks framework debugging with blackboxed ranges.'); |
6 | 6 |
7 InspectorTest.addScript( | 7 InspectorTest.addScript( |
8 ` | 8 ` |
9 function foo() { | 9 function foo() { |
10 return boo(); | 10 return boo(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 }, | 57 }, |
58 function testBooPartiallyBlackboxed3(next) { | 58 function testBooPartiallyBlackboxed3(next) { |
59 // first line is blackboxed, second and third - not. | 59 // first line is blackboxed, second and third - not. |
60 testPositions([ | 60 testPositions([ |
61 position(11, 0), position(12, 0), position(14, 0) | 61 position(11, 0), position(12, 0), position(14, 0) |
62 ]).then(next); | 62 ]).then(next); |
63 } | 63 } |
64 ]; | 64 ]; |
65 | 65 |
66 function testPositions(positions) { | 66 function testPositions(positions) { |
67 utils.schedulePauseOnNextStatement('', ''); | 67 InspectorTest.contextGroup.schedulePauseOnNextStatement('', ''); |
68 return Protocol.Debugger | 68 return Protocol.Debugger |
69 .setBlackboxedRanges({scriptId: scriptId, positions: positions}) | 69 .setBlackboxedRanges({scriptId: scriptId, positions: positions}) |
70 .then(InspectorTest.logMessage) | 70 .then(InspectorTest.logMessage) |
71 .then( | 71 .then( |
72 () => Protocol.Runtime.evaluate( | 72 () => Protocol.Runtime.evaluate( |
73 {expression: 'testFunction()//# sourceURL=expr.js'})); | 73 {expression: 'testFunction()//# sourceURL=expr.js'})); |
74 } | 74 } |
75 | 75 |
76 function position(line, column) { | 76 function position(line, column) { |
77 return {lineNumber: line, columnNumber: column}; | 77 return {lineNumber: line, columnNumber: column}; |
78 } | 78 } |
OLD | NEW |