OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script>function foo() { }; | 3 <script>function foo() { }; |
4 </script> | 4 </script> |
5 <script> | 5 <script> |
6 function bar() { }; | 6 function bar() { }; |
7 </script><script>function f1() { debugger; }</script> | 7 </script><script>function f1() { debugger; }</script> |
8 <script> | 8 <script> |
9 function f2() { return f1(); } | 9 function f2() { return f1(); } |
10 </script> | 10 </script> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 var callFrameIndex = 0; | 53 var callFrameIndex = 0; |
54 function dumpNextCallFrame(next) | 54 function dumpNextCallFrame(next) |
55 { | 55 { |
56 var callFrames = WebInspector.debuggerModel.callFrames; | 56 var callFrames = WebInspector.debuggerModel.callFrames; |
57 if (callFrameIndex === callFrames.length) { | 57 if (callFrameIndex === callFrames.length) { |
58 next(); | 58 next(); |
59 return; | 59 return; |
60 } | 60 } |
61 var frame = callFrames[callFrameIndex]; | 61 var frame = callFrames[callFrameIndex]; |
62 var uiLocation = WebInspector.debuggerModel.rawLocationToUILocation(fram
e.location); | 62 var uiLocation = frame.location().toUILocation(); |
63 InspectorTest.showUISourceCode(uiLocation.uiSourceCode, dumpCallFrameLin
e); | 63 InspectorTest.showUISourceCode(uiLocation.uiSourceCode, dumpCallFrameLin
e); |
64 | 64 |
65 function dumpCallFrameLine(sourceFrame) | 65 function dumpCallFrameLine(sourceFrame) |
66 { | 66 { |
67 var resourceText = sourceFrame._textEditor.text(); | 67 var resourceText = sourceFrame._textEditor.text(); |
68 var lines = resourceText.split("\n"); | 68 var lines = resourceText.split("\n"); |
69 var lineNumber = uiLocation.lineNumber; | 69 var lineNumber = uiLocation.lineNumber; |
70 InspectorTest.addResult("Frame " + callFrameIndex + ") line " + line
Number + ", content: " + lines[lineNumber] + " (must be part of function '" + fr
ame.functionName + "')"); | 70 InspectorTest.addResult("Frame " + callFrameIndex + ") line " + line
Number + ", content: " + lines[lineNumber] + " (must be part of function '" + fr
ame.functionName + "')"); |
71 callFrameIndex++ | 71 callFrameIndex++ |
72 dumpNextCallFrame(next); | 72 dumpNextCallFrame(next); |
(...skipping 15 matching lines...) Expand all Loading... |
88 </head> | 88 </head> |
89 | 89 |
90 <body onload="runTest()"> | 90 <body onload="runTest()"> |
91 <p> | 91 <p> |
92 Tests that main resource script text is correct when paused in inline script on
reload. | 92 Tests that main resource script text is correct when paused in inline script on
reload. |
93 <a href="https://bugs.webkit.org/show_bug.cgi?id=77548">Bug 77548.</a> | 93 <a href="https://bugs.webkit.org/show_bug.cgi?id=77548">Bug 77548.</a> |
94 </p> | 94 </p> |
95 | 95 |
96 </body> | 96 </body> |
97 </html> | 97 </html> |
OLD | NEW |