Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / sources / debugger / debugger-step-over.html
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 f()
8 {
9     var i = 10;
10 }
11
12 function d()
13 {
14     debugger;
15     f();
16 }
17
18 function testFunction()
19 {
20     d();
21 }
22
23 var test = function()
24 {
25     InspectorTest.startDebuggerTest(step1);
26
27     function step1()
28     {
29         InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
30     }
31
32     var stepCount = 0;
33     function step2(callFrames)
34     {
35         InspectorTest.captureStackTrace(callFrames);
36         if (stepCount < 2) {
37             InspectorTest.addResult("Stepping over...");
38             WebInspector.panels.sources._stepOverButton.element.click();
39             InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(InspectorTest, step2));
40         } else
41             InspectorTest.completeDebuggerTest();
42         stepCount++;
43     }
44 }
45
46 </script>
47 </head>
48
49 <body onload="runTest()">
50 <p>
51 Tests "step over" functionality in debugger.
52 </p>
53
54 </body>
55 </html>