Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / inspector / debugger-step-on-do-while-statements.html
blob190cbf8c14386056665c124a74495368d38384d7
1 <script src="resources/loop-statements.js"></script>
2 <script>
3 function runDoWhile()
5 /* place breakpoint on next line and click continue */ debugger;
6 do {
7 statement();
8 increment();
9 } while (condition());
12 </script>
13 Start a debugging session in the Web Inspector and open this file.
14 <br><br>
15 Before running the tests please perform the following:
16 Make sure the execution is not paused in the debugger.<br>
17 Click the button and when the debugger breaks, set a breakpoint on the first line in the loop
18 (as indicated by the comment), and click continue.<br>
19 The debugger should stop at the beggining of the loop.<br>
20 The above actions should be performed before <b>each</b> of the following tests.
21 <br><br>
22 <input type="button" value="run do-while" onclick="initialize();runDoWhile()"/>
23 <br><br>
24 TEST 1: Click 'continue'. Execution should continue without stopping on the loop breakpoint again.<br>
25 TEST 2: Click 'Step over'. Debugger should step inside the loop to the next statement line.
26 'Step over' until the debugger reaches the 'while' line. Click 'Step into' - the debugger should
27 enter the 'condition' function.<br>
28 TEST 3: 'Step over' to the end of the loop (and 'while' statement) and step over again. Debugger
29 should go to the beggining of the loop.<br>