| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource
s/inspector-protocol-test.js"></script> | |
| 4 <script> | |
| 5 | |
| 6 function testFunction() | |
| 7 { | |
| 8 var e = document.getElementById("div"); | |
| 9 debugger; | |
| 10 e.click(); | |
| 11 } | |
| 12 | |
| 13 function shouldNotBeThisFunction() | |
| 14 { | |
| 15 return 239; | |
| 16 } | |
| 17 | |
| 18 function test() | |
| 19 { | |
| 20 InspectorTest.waitForEventPromise("Debugger.paused").then(makeStepping); | |
| 21 | |
| 22 InspectorTest.sendCommandPromise("Debugger.enable", {}) | |
| 23 .then((result) => InspectorTest.sendCommandPromise("Runtime.evaluate", {
expression: "testFunction()" })) | |
| 24 .then(() => InspectorTest.completeTest()); | |
| 25 | |
| 26 function makeStepping() | |
| 27 { | |
| 28 sendCommandAndWaitForPause("Debugger.stepInto") | |
| 29 .then(() => sendCommandAndWaitForPause("Debugger.stepInto")) | |
| 30 .then((result) => dumpTopCallFrame(result)) | |
| 31 .then(() => InspectorTest.sendCommandPromise("Debugger.resume")); | |
| 32 } | |
| 33 | |
| 34 function sendCommandAndWaitForPause(command) | |
| 35 { | |
| 36 InspectorTest.sendCommand(command, {}); | |
| 37 return InspectorTest.waitForEventPromise("Debugger.paused"); | |
| 38 } | |
| 39 | |
| 40 function dumpTopCallFrame(result) | |
| 41 { | |
| 42 var frame = result.params.callFrames[0]; | |
| 43 InspectorTest.log("functionName (should be empty): " + (frame.functionNa
me.length ? frame.functionName : "empty")); | |
| 44 } | |
| 45 } | |
| 46 </script> | |
| 47 </head> | |
| 48 <div id="div" onclick="shouldNotBeThisFunction()"> | |
| 49 </div> | |
| 50 <body onLoad="runTest();"> | |
| 51 Tests that Debugger.stepInto doesn't ignore inline event listeners. | |
| 52 </body> | |
| 53 </html> | |
| 54 | |
| OLD | NEW |