| 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> | |
| 6 | |
| 7 function testFunction() | |
| 8 { | |
| 9 setTimeout(callback1, 0); | |
| 10 } | |
| 11 | |
| 12 function callback1() | |
| 13 { | |
| 14 setTimeout(callback2, 0); | |
| 15 debugger; | |
| 16 return 1; | |
| 17 } | |
| 18 | |
| 19 function callback2() | |
| 20 { | |
| 21 var dummy = 42; // Should pause here. | |
| 22 (function FAIL_Should_Not_Pause_Here() { debugger; })(); | |
| 23 | |
| 24 if (window.testRunner) | |
| 25 testRunner.evaluateInWebInspector(0, "(InspectorTest.completeDebuggerTes
t())") | |
| 26 } | |
| 27 | |
| 28 var test = function() | |
| 29 { | |
| 30 InspectorTest.startDebuggerTest(step1, true); | |
| 31 | |
| 32 function step1() | |
| 33 { | |
| 34 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | |
| 35 } | |
| 36 | |
| 37 function step2() | |
| 38 { | |
| 39 var actions = [ | |
| 40 "Print", // "debugger" in callback1 | |
| 41 "StepOut", | |
| 42 "Print", | |
| 43 ]; | |
| 44 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, resume); | |
| 45 } | |
| 46 | |
| 47 function resume() | |
| 48 { | |
| 49 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Inspect
orTest, resume)); | |
| 50 } | |
| 51 } | |
| 52 | |
| 53 </script> | |
| 54 </head> | |
| 55 | |
| 56 <body onload="runTest()"> | |
| 57 <p> | |
| 58 Tests that debugger StepOut will stop inside next timeout handler. | |
| 59 </p> | |
| 60 </body> | |
| 61 </html> | |
| OLD | NEW |