Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / sources / debugger / pause-in-internal-script.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
6 <script>
7
8 function testFunction()
9 {
10     var array = [2, 5, 7];
11     var sum = 0;
12     array.forEach(function(key)
13     {
14         sum += array[key];
15     });
16     return sum;
17 }
18
19 function test()
20 {
21     InspectorTest.runDebuggerTestSuite([
22         function testSetBreakpoint(next)
23         {
24             InspectorTest.showScriptSource("pause-in-internal-script.html", didShowScriptSource);
25
26             function didShowScriptSource(sourceFrame)
27             {
28                 InspectorTest.addResult("Script source was shown.");
29                 InspectorTest.setBreakpoint(sourceFrame, 13, "", true);
30                 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
31             }
32
33             function didPause(callFrames)
34             {
35                 InspectorTest.captureStackTrace(callFrames);
36                 next();
37             }
38         }
39     ]);
40 };
41
42 </script>
43
44 </head>
45
46 <body onload="runTest()">
47 <p>Tests that internal scripts unknown to front-end are processed correctly when appear in debugger call frames.
48 <a href="https://bugs.webkit.org/show_bug.cgi?id=64995">Bug 64995</a>
49 </p>
50
51 </body>
52 </html>