| 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="breakpoint-manager.js"></script> | 4 <script src="breakpoint-manager.js"></script> |
| 5 <script> | 5 <script> |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var mockTarget; | 8 var mockTarget; |
| 9 var lastTargetId = 0; | 9 var lastTargetId = 0; |
| 10 | 10 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 function testSourceMapping(next) | 176 function testSourceMapping(next) |
| 177 { | 177 { |
| 178 var shiftingMapping = { | 178 var shiftingMapping = { |
| 179 rawLocationToUILocation: function(rawLocation) | 179 rawLocationToUILocation: function(rawLocation) |
| 180 { | 180 { |
| 181 if (this._disabled) | 181 if (this._disabled) |
| 182 return null; | 182 return null; |
| 183 return InspectorTest.uiSourceCodes[rawLocation.scriptId].uiL
ocation(rawLocation.lineNumber + 10, 0); | 183 return InspectorTest.uiSourceCodes[rawLocation.scriptId].uiL
ocation(rawLocation.lineNumber + 10, 0); |
| 184 }, | 184 }, |
| 185 | 185 |
| 186 uiLocationToRawLocation: function(uiSourceCode, lineNumber) | 186 uiLocationToRawLocations: function(uiSourceCode, lineNumber) |
| 187 { | 187 { |
| 188 return new SDK.DebuggerModel.Location(mockTarget.debuggerMod
el, uiSourceCode.url(), lineNumber - 10, 0); | 188 return [new SDK.DebuggerModel.Location(mockTarget.debuggerMo
del, uiSourceCode.url(), lineNumber - 10, 0)]; |
| 189 }, | 189 }, |
| 190 | 190 |
| 191 isIdentity: function() | 191 isIdentity: function() |
| 192 { | 192 { |
| 193 return false; | 193 return false; |
| 194 } | 194 } |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 // Source mapping will shift everything 10 lines ahead so that break
point 1 clashes with breakpoint 2. | 197 // Source mapping will shift everything 10 lines ahead so that break
point 1 clashes with breakpoint 2. |
| 198 var serializedBreakpoints = []; | 198 var serializedBreakpoints = []; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 function createSourceMapping(uiSourceCodeA, uiSourceCodeB) | 248 function createSourceMapping(uiSourceCodeA, uiSourceCodeB) |
| 249 { | 249 { |
| 250 var mapping = { | 250 var mapping = { |
| 251 rawLocationToUILocation: function(rawLocation) | 251 rawLocationToUILocation: function(rawLocation) |
| 252 { | 252 { |
| 253 if (this._disabled) | 253 if (this._disabled) |
| 254 return null; | 254 return null; |
| 255 return uiSourceCodeB.uiLocation(rawLocation.lineNumber +
10, 0); | 255 return uiSourceCodeB.uiLocation(rawLocation.lineNumber +
10, 0); |
| 256 }, | 256 }, |
| 257 | 257 |
| 258 uiLocationToRawLocation: function(uiSourceCode, lineNumber) | 258 uiLocationToRawLocations: function(uiSourceCode, lineNumber) |
| 259 { | 259 { |
| 260 return new SDK.DebuggerModel.Location(mockTarget.debugge
rModel, uiSourceCodeA.url(), lineNumber - 10, 0); | 260 return [new SDK.DebuggerModel.Location(mockTarget.debugg
erModel, uiSourceCodeA.url(), lineNumber - 10, 0)]; |
| 261 }, | 261 }, |
| 262 | 262 |
| 263 isIdentity: function() | 263 isIdentity: function() |
| 264 { | 264 { |
| 265 return false; | 265 return false; |
| 266 } | 266 } |
| 267 }; | 267 }; |
| 268 | 268 |
| 269 return mapping; | 269 return mapping; |
| 270 } | 270 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 }; | 340 }; |
| 341 </script> | 341 </script> |
| 342 | 342 |
| 343 </head> | 343 </head> |
| 344 | 344 |
| 345 <body onload="runTest()"> | 345 <body onload="runTest()"> |
| 346 <p>Tests BreakpointManager class.</p> | 346 <p>Tests BreakpointManager class.</p> |
| 347 | 347 |
| 348 </body> | 348 </body> |
| 349 </html> | 349 </html> |
| OLD | NEW |