Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-step / debugger-step-over-across-timeouts.html
blob67534ec4122d4f66f2f4c8897e88026592cc0926
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>
7 function testFunction()
9 setTimeout(callback1, 0);
12 function callback1()
14 setTimeout(callback2, 0);
15 debugger;
18 function callback2()
20 var dummy = 42; // Should pause here.
21 (function FAIL_Should_Not_Pause_Here() { debugger; })();
23 if (window.testRunner)
24 testRunner.evaluateInWebInspector(0, "(InspectorTest.completeDebuggerTest())")
27 var test = function()
29 InspectorTest.startDebuggerTest(step1, true);
31 function step1()
33 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
36 function step2()
38 var actions = [
39 "Print", // "debugger" in callback1
40 "StepOver",
41 "StepOver",
42 "Print",
44 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, resume);
47 function resume()
49 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, resume));
53 </script>
54 </head>
56 <body onload="runTest()">
57 <p>
58 Tests that debugger StepOver will stop inside next timeout handler.
59 </p>
60 </body>
61 </html>