Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 (async function(testRunner) { | |
| 2 let {page, session, dp} = await testRunner.startBlank(''); | |
| 3 | |
| 4 dp.Debugger.enable(); | |
| 5 dp.Runtime.evaluate({expression: ` | |
| 6 | |
|
chenwilliam
2017/06/30 20:23:27
I'm guessing the empty lines is just to preserve l
| |
| 7 | |
| 8 | |
| 9 | |
| 10 function testFunction() | |
| 11 { | |
| 12 var a = 2; | |
| 13 debugger; | |
| 14 } | |
| 15 setTimeout(testFunction, 0); | |
| 16 `}); | |
| 17 | |
| 18 var messageObject = await dp.Debugger.oncePaused(); | |
| 19 testRunner.log(`Paused on 'debugger;'`); | |
| 20 var topFrame = messageObject.params.callFrames[0]; | |
| 21 topFrame.location.scriptId = '42'; | |
| 22 topFrame.functionLocation.scriptId = '42'; | |
| 23 testRunner.log('Top frame location: ' + JSON.stringify(topFrame.location)); | |
| 24 testRunner.log('Top frame functionLocation: ' + JSON.stringify(topFrame.functi onLocation)); | |
| 25 testRunner.completeTest(); | |
| 26 }) | |
| OLD | NEW |