| 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 // Flags: --expose-inspector-scripts | 4 // Flags: --expose-inspector-scripts |
| 5 | 5 |
| 6 let {session, contextGroup, Protocol} = InspectorTest.start('Tests that stepping
does not ignore injected script when passed a flag'); |
| 7 |
| 6 Protocol.Debugger.onPaused(message => { | 8 Protocol.Debugger.onPaused(message => { |
| 7 let url = InspectorTest.session._scriptMap.get(message.params.callFrames[0].lo
cation.scriptId).url; | 9 let url = session._scriptMap.get(message.params.callFrames[0].location.scriptI
d).url; |
| 8 if (url !== 'test.js') { | 10 if (url !== 'test.js') { |
| 9 InspectorTest.log('InjectedSciptSource on stack.'); | 11 InspectorTest.log('InjectedSciptSource on stack.'); |
| 10 InspectorTest.completeTest(); | 12 InspectorTest.completeTest(); |
| 11 } | 13 } |
| 12 Protocol.Debugger.stepInto(); | 14 Protocol.Debugger.stepInto(); |
| 13 }); | 15 }); |
| 14 | 16 |
| 15 InspectorTest.setupScriptMap(); | 17 session.setupScriptMap(); |
| 16 Protocol.Debugger.enable(); | 18 Protocol.Debugger.enable(); |
| 17 Protocol.Debugger.pause(); | 19 Protocol.Debugger.pause(); |
| 18 Protocol.Runtime.evaluate({expression: 'console.log(42)//# sourceURL=test.js'}) | 20 Protocol.Runtime.evaluate({expression: 'console.log(42)//# sourceURL=test.js'}) |
| 19 .then(() => InspectorTest.log('InjectedSciptSource was not reached')) | 21 .then(() => InspectorTest.log('InjectedSciptSource was not reached')) |
| 20 .then(InspectorTest.completeTest); | 22 .then(InspectorTest.completeTest); |
| OLD | NEW |