OLD | NEW |
(Empty) | |
| 1 (async function(testRunner) { |
| 2 let {page, session, dp} = await testRunner.startHTML(` |
| 3 <script> |
| 4 function testFunction() { |
| 5 var e = document.getElementById('div'); |
| 6 debugger; |
| 7 e.click(); |
| 8 } |
| 9 |
| 10 function shouldNotBeThisFunction() { |
| 11 return 239; |
| 12 } |
| 13 </script> |
| 14 <div id='div' onclick='shouldNotBeThisFunction()'></div> |
| 15 `, `Tests that Debugger.stepInto doesn't ignore inline event listeners.`); |
| 16 |
| 17 |
| 18 function dumpTopCallFrame(result) { |
| 19 var frame = result.params.callFrames[0]; |
| 20 testRunner.log('functionName (should be empty): ' + (frame.functionName.leng
th ? frame.functionName : 'empty')); |
| 21 } |
| 22 |
| 23 await dp.Debugger.enable(); |
| 24 var finished = dp.Runtime.evaluate({expression: 'testFunction()'}); |
| 25 |
| 26 await dp.Debugger.oncePaused(); |
| 27 dp.Debugger.stepInto(); |
| 28 await dp.Debugger.oncePaused(); |
| 29 dp.Debugger.stepInto(); |
| 30 dumpTopCallFrame(await dp.Debugger.oncePaused()); |
| 31 dp.Debugger.resume(); |
| 32 |
| 33 await finished; |
| 34 testRunner.completeTest(); |
| 35 }) |
OLD | NEW |