Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | |
| 5 <script src="../../../http/tests/inspector/console-test.js"></script> | |
| 6 <script> | |
| 7 | |
| 8 function runSetTimeoutWithSyntaxError() | |
| 9 { | |
| 10 setTimeout({}, 0); | |
| 11 setTimeout(executeSomeCode, 100); | |
| 12 } | |
| 13 | |
| 14 function executeSomeCode() | |
| 15 { | |
| 16 debugger; // should stop here not earlier | |
| 17 } | |
| 18 | |
| 19 var test = function() | |
| 20 { | |
| 21 InspectorTest.startDebuggerTest(step1, true); | |
| 22 | |
| 23 function step1() | |
| 24 { | |
| 25 WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._setBr eakpoint("instrumentation:timerFired"); | |
| 26 InspectorTest.evaluateInPage("runSetTimeoutWithSyntaxError()", Inspector Test.waitUntilMessageReceived.bind(this, step2)); | |
| 27 } | |
| 28 | |
| 29 function step2() | |
| 30 { | |
| 31 var actions = [ "Print" ]; | |
| 32 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); | |
| 33 InspectorTest.evaluateInPage("executeSomeCode()"); | |
|
dgozman
2016/04/15 16:40:01
I don't get how this test works.
kozy
2016/04/15 17:11:47
Done.
| |
| 34 } | |
| 35 | |
| 36 function step3() | |
| 37 { | |
| 38 WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._remov eBreakpoint("instrumentation:timerFired"); | |
| 39 InspectorTest.completeDebuggerTest(); | |
| 40 } | |
| 41 } | |
| 42 | |
| 43 </script> | |
| 44 </head> | |
| 45 | |
| 46 <body onload="runTest()"> | |
| 47 <p> | |
| 48 Tests that scheduled pause is cleared after processing event with empty handler. | |
| 49 </p> | |
| 50 <div id="myDiv"></div> | |
| 51 </body> | |
| 52 </html> | |
| OLD | NEW |