Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 (async function(testRunner) { | |
| 2 let {page, session, dp} = await testRunner.startBlank('Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.') ; | |
|
chenwilliam
2017/06/30 20:23:27
typo: s/then end/the end
| |
| 3 | |
| 4 function logStack(event) { | |
| 5 testRunner.log('Stack trace:'); | |
| 6 for (var callFrame of event.params.callFrames) | |
| 7 testRunner.log(callFrame.functionName + ':' + callFrame.location.lineNumbe r + ':' + callFrame.location.columnNumber); | |
| 8 testRunner.log(''); | |
| 9 } | |
| 10 | |
| 11 dp.Debugger.enable(); | |
| 12 await session.evaluate(` | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 function foo() { | |
| 19 return 239; | |
| 20 }`); | |
| 21 dp.Runtime.evaluate({expression: '(function boo() { setTimeout(foo, 0); debugg er; })()' }); | |
| 22 | |
| 23 logStack(await dp.Debugger.oncePaused()); | |
| 24 testRunner.log('Perform stepInto'); | |
| 25 dp.Debugger.stepInto(); | |
| 26 | |
| 27 logStack(await dp.Debugger.oncePaused()); | |
| 28 testRunner.log('Perform stepInto'); | |
| 29 dp.Debugger.stepInto(); | |
| 30 | |
| 31 logStack(await dp.Debugger.oncePaused()); | |
| 32 testRunner.log('Perform stepInto'); | |
| 33 dp.Debugger.stepInto(); | |
| 34 | |
| 35 logStack(await dp.Debugger.oncePaused()); | |
| 36 await dp.Debugger.resume(); | |
| 37 testRunner.completeTest(); | |
| 38 }) | |
| OLD | NEW |