Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / debugger / debugger-no-nested-pause.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 testFunction()
8 {
9     testFunction.invocationCount++;
10     debugger;
11 }
12
13 testFunction.invocationCount = 0;
14
15 var test = function()
16 {
17     InspectorTest.startDebuggerTest(step1);
18
19     function step1()
20     {
21         InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
22     }
23
24     function step2()
25     {
26         InspectorTest.evaluateInConsole("testFunction(); testFunction.invocationCount", step3);
27         InspectorTest.addResult("Set timer for test function.");
28     }
29
30     function step3(result)
31     {
32         InspectorTest.addResult("testFunction.invocationCount = " + result);
33         InspectorTest.completeDebuggerTest();
34     }
35 }
36
37 </script>
38 </head>
39
40 <body onload="runTest()">
41 <p>
42 Tests that debugger will skip breakpoint hit when script execution is already paused. <a href="https://bugs.webkit.org/show_bug.cgi?id=41768">See bug</a>
43 </p>
44
45 </body>
46 </html>