OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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.addScript( | 5 let {session, contextGroup, Protocol} = InspectorTest.start('Tests blackboxing b
y patterns'); |
| 6 |
| 7 contextGroup.addScript( |
6 `function bar() | 8 `function bar() |
7 { | 9 { |
8 return 42; | 10 return 42; |
9 }`); | 11 }`); |
10 | 12 |
11 InspectorTest.addScript( | 13 contextGroup.addScript( |
12 `function foo() | 14 `function foo() |
13 { | 15 { |
14 var a = bar(); | 16 var a = bar(); |
15 return a + 1; | 17 return a + 1; |
16 } | 18 } |
17 //# sourceURL=foo.js`); | 19 //# sourceURL=foo.js`); |
18 | 20 |
19 InspectorTest.addScript( | 21 contextGroup.addScript( |
20 `function qwe() | 22 `function qwe() |
21 { | 23 { |
22 var a = foo(); | 24 var a = foo(); |
23 return a + 1; | 25 return a + 1; |
24 } | 26 } |
25 //# sourceURL=qwe.js`); | 27 //# sourceURL=qwe.js`); |
26 | 28 |
27 InspectorTest.addScript( | 29 contextGroup.addScript( |
28 `function baz() | 30 `function baz() |
29 { | 31 { |
30 var a = qwe(); | 32 var a = qwe(); |
31 return a + 1; | 33 return a + 1; |
32 } | 34 } |
33 //# sourceURL=baz.js`); | 35 //# sourceURL=baz.js`); |
34 | 36 |
35 Protocol.Debugger.enable(); | 37 Protocol.Debugger.enable(); |
36 Protocol.Debugger.setBlackboxPatterns({ patterns: [ "foo([" ] }).then(dumpError)
; | 38 Protocol.Debugger.setBlackboxPatterns({ patterns: [ "foo([" ] }).then(dumpError)
; |
37 | 39 |
(...skipping 12 matching lines...) Expand all Loading... |
50 var callFrames = message.params.callFrames; | 52 var callFrames = message.params.callFrames; |
51 for (var callFrame of callFrames) | 53 for (var callFrame of callFrames) |
52 InspectorTest.log((callFrame.functionName || "(...)") + ":" + (callFrame.loc
ation.lineNumber + 1)); | 54 InspectorTest.log((callFrame.functionName || "(...)") + ":" + (callFrame.loc
ation.lineNumber + 1)); |
53 var command = commands.shift(); | 55 var command = commands.shift(); |
54 if (!command) { | 56 if (!command) { |
55 InspectorTest.completeTest(); | 57 InspectorTest.completeTest(); |
56 return; | 58 return; |
57 } | 59 } |
58 Protocol.Debugger[command](); | 60 Protocol.Debugger[command](); |
59 } | 61 } |
OLD | NEW |