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