| 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 <script src="../../../http/tests/inspector/live-edit-test.js"></script> | 5 <script src="../../../http/tests/inspector/live-edit-test.js"></script> |
| 6 <script src="resources/edit-me-breakpoints.js"></script> | 6 <script src="resources/edit-me-breakpoints.js"></script> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function test() | 9 function test() |
| 10 { | 10 { |
| 11 function pathToFileName(path) | 11 function pathToFileName(path) |
| 12 { | 12 { |
| 13 return path.substring(path.lastIndexOf("/") + 1).replace(/VM[\d]+/, "VMX
X"); | 13 return path.substring(path.lastIndexOf("/") + 1).replace(/VM[\d]+/, "VMX
X"); |
| 14 } | 14 } |
| 15 | 15 |
| 16 function dumpBreakpointStorageAndLocations() | 16 function dumpBreakpointStorageAndLocations() |
| 17 { | 17 { |
| 18 var breakpointManager = Bindings.breakpointManager; | 18 var breakpointManager = Bindings.breakpointManager; |
| 19 var breakpoints = breakpointManager._storage._setting.get(); | 19 var breakpoints = breakpointManager._storage._setting.get(); |
| 20 InspectorTest.addResult(" Dumping breakpoint storage"); | 20 InspectorTest.addResult(" Dumping breakpoint storage"); |
| 21 for (var i = 0; i < breakpoints.length; ++i) | 21 for (var i = 0; i < breakpoints.length; ++i) |
| 22 InspectorTest.addResult(" " + pathToFileName(breakpoints[i].s
ourceFileId) + ":" + breakpoints[i].lineNumber + ", enabled:" + breakpoints[i].e
nabled); | 22 InspectorTest.addResult(" " + pathToFileName(breakpoints[i].u
rl) + ":" + breakpoints[i].lineNumber + ", enabled:" + breakpoints[i].enabled); |
| 23 | 23 |
| 24 locations = breakpointManager.allBreakpointLocations(); | 24 locations = breakpointManager.allBreakpointLocations(); |
| 25 InspectorTest.addResult(" Dumping breakpoint locations"); | 25 InspectorTest.addResult(" Dumping breakpoint locations"); |
| 26 for (var i = 0; i < locations.length; ++i) { | 26 for (var i = 0; i < locations.length; ++i) { |
| 27 var uiLocation = locations[i].uiLocation; | 27 var uiLocation = locations[i].uiLocation; |
| 28 var uiSourceCode = uiLocation.uiSourceCode; | 28 var uiSourceCode = uiLocation.uiSourceCode; |
| 29 var url = uiSourceCode.url(); | 29 var url = uiSourceCode.url(); |
| 30 var lineNumber = uiLocation.lineNumber; | 30 var lineNumber = uiLocation.lineNumber; |
| 31 var project = uiSourceCode.project(); | 31 var project = uiSourceCode.project(); |
| 32 InspectorTest.addResult(" url: " + pathToFileName(url) + ", l
ineNumber: " + lineNumber + ", project type: " + project.type()); | 32 InspectorTest.addResult(" url: " + pathToFileName(url) + ", l
ineNumber: " + lineNumber + ", project type: " + project.type()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 breakpoints = breakpointManager._allBreakpoints(); | 35 breakpoints = breakpointManager._allBreakpoints(); |
| 36 InspectorTest.addResult(" Dumping breakpoints"); | 36 InspectorTest.addResult(" Dumping breakpoints"); |
| 37 for (var i = 0; i < breakpoints.length; ++i) { | 37 for (var i = 0; i < breakpoints.length; ++i) { |
| 38 var breakpoint = breakpoints[i]; | 38 var breakpoint = breakpoints[i]; |
| 39 var uiSourceCode = breakpointManager._workspace.uiSourceCode(breakpo
int.projectId(), breakpoint.path()); | 39 var uiSourceCode = breakpointManager._workspace.uiSourceCode(breakpo
int.projectId(), breakpoint.url()); |
| 40 var lineNumber = breakpoint.lineNumber(); | 40 var lineNumber = breakpoint.lineNumber(); |
| 41 var url = uiSourceCode.url(); | 41 var url = uiSourceCode.url(); |
| 42 var project = uiSourceCode.project(); | 42 var project = uiSourceCode.project(); |
| 43 InspectorTest.addResult(" url: " + pathToFileName(url) + ", l
ineNumber: " + lineNumber + ", project type: " + project.type()); | 43 InspectorTest.addResult(" url: " + pathToFileName(url) + ", l
ineNumber: " + lineNumber + ", project type: " + project.type()); |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 Bindings.breakpointManager._storage._breakpoints = {}; | 47 Bindings.breakpointManager._storage._breakpoints = {}; |
| 48 | 48 |
| 49 InspectorTest.runDebuggerTestSuite([ | 49 InspectorTest.runDebuggerTestSuite([ |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 ]); | 283 ]); |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 </script> | 286 </script> |
| 287 </head> | 287 </head> |
| 288 <body onload="runTest()"> | 288 <body onload="runTest()"> |
| 289 <p>Tests breakpoints are correctly dimmed and restored in JavaScriptSourceFrame
during live edit.</p> | 289 <p>Tests breakpoints are correctly dimmed and restored in JavaScriptSourceFrame
during live edit.</p> |
| 290 <a href="https://bugs.webkit.org/show_bug.cgi?id=99598">Bug 99598</a> | 290 <a href="https://bugs.webkit.org/show_bug.cgi?id=99598">Bug 99598</a> |
| 291 </body> | 291 </body> |
| 292 </html> | 292 </html> |
| OLD | NEW |