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 } | |
17 | |
18 function callback2() | |
19 { | |
20 var dummy = 42; // Should pause here. | |
21 (function FAIL_Should_Not_Pause_Here() { debugger; })(); | |
yurys
2014/11/18 12:35:25
Why do we need this code?
aandrey
2014/11/18 13:35:00
To make it *fail* w/o this patch instead of timing
| |
22 | |
23 if (window.testRunner) | |
24 testRunner.evaluateInWebInspector(0, "(InspectorTest.completeDebuggerTes t())") | |
25 } | |
26 | |
27 var test = function() | |
28 { | |
29 InspectorTest.startDebuggerTest(step1, true); | |
30 | |
31 function step1() | |
32 { | |
33 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | |
34 } | |
35 | |
36 function step2() | |
37 { | |
38 var actions = [ | |
39 "Print", // "debugger" in callback1 | |
40 "StepInto", | |
41 "StepInto", | |
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 StepInto will stop inside next timeout handler. | |
59 </p> | |
60 </body> | |
61 </html> | |
OLD | NEW |