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