OLD | NEW |
1 var initialize_BreakpointManagerTest = function() { | 1 var initialize_BreakpointManagerTest = function() { |
2 | 2 |
3 InspectorTest.uiSourceCodes = {}; | 3 InspectorTest.uiSourceCodes = {}; |
4 | 4 |
5 InspectorTest.dumpTargetIds = false; | 5 InspectorTest.dumpTargetIds = false; |
6 | 6 |
7 InspectorTest.initializeDefaultMappingOnTarget = function(target) | 7 InspectorTest.initializeDefaultMappingOnTarget = function(target) |
8 { | 8 { |
9 var defaultMapping = { | 9 var defaultMapping = { |
10 rawLocationToUILocation: function(rawLocation) | 10 rawLocationToUILocation: function(rawLocation) |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 } | 219 } |
220 | 220 |
221 InspectorTest.addScript = function(target, breakpointManager, url) | 221 InspectorTest.addScript = function(target, breakpointManager, url) |
222 { | 222 { |
223 target.debuggerModel._addScript(url, url); | 223 target.debuggerModel._addScript(url, url); |
224 InspectorTest.addResult(" Adding script: " + url); | 224 InspectorTest.addResult(" Adding script: " + url); |
225 var uiSourceCodes = breakpointManager._workspace.uiSourceCodesForProjectType
(WebInspector.projectTypes.Debugger); | 225 var uiSourceCodes = breakpointManager._workspace.uiSourceCodesForProjectType
(WebInspector.projectTypes.Debugger); |
226 for (var i = 0; i < uiSourceCodes.length; ++i) { | 226 for (var i = 0; i < uiSourceCodes.length; ++i) { |
227 var uiSourceCode = uiSourceCodes[i]; | 227 var uiSourceCode = uiSourceCodes[i]; |
228 if (uiSourceCode.url === url) { | 228 if (uiSourceCode.url === url) { |
229 uiSourceCode.setSourceMappingForTarget(target, breakpointManager.def
aultMapping); | 229 breakpointManager._debuggerWorkspaceBinding.setSourceMapping(target,
uiSourceCode, breakpointManager.defaultMapping); |
230 InspectorTest.uiSourceCodes[url] = uiSourceCode; | 230 InspectorTest.uiSourceCodes[url] = uiSourceCode; |
231 return uiSourceCode; | 231 return uiSourceCode; |
232 } | 232 } |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 InspectorTest.addUISourceCode = function(target, breakpointManager, url, doNotSe
tSourceMapping, doNotAddScript) | 236 InspectorTest.addUISourceCode = function(target, breakpointManager, url, doNotSe
tSourceMapping, doNotAddScript) |
237 { | 237 { |
238 if (!doNotAddScript) | 238 if (!doNotAddScript) |
239 InspectorTest.addScript(target, breakpointManager, url); | 239 InspectorTest.addScript(target, breakpointManager, url); |
240 InspectorTest.addResult(" Adding UISourceCode: " + url); | 240 InspectorTest.addResult(" Adding UISourceCode: " + url); |
241 var contentProvider = new WebInspector.StaticContentProvider(WebInspector.re
sourceTypes.Script, ""); | 241 var contentProvider = new WebInspector.StaticContentProvider(WebInspector.re
sourceTypes.Script, ""); |
242 var binding = breakpointManager._debuggerWorkspaceBinding; | 242 var binding = breakpointManager._debuggerWorkspaceBinding; |
243 var uiSourceCode = binding._networkWorkspaceBinding.addFileForURL(url, conte
ntProvider); | 243 var uiSourceCode = binding._networkWorkspaceBinding.addFileForURL(url, conte
ntProvider); |
244 InspectorTest.uiSourceCodes[url] = uiSourceCode; | 244 InspectorTest.uiSourceCodes[url] = uiSourceCode; |
245 if (!doNotSetSourceMapping) { | 245 if (!doNotSetSourceMapping) { |
246 uiSourceCode.setSourceMappingForTarget(target, breakpointManager.default
Mapping); | 246 breakpointManager._debuggerWorkspaceBinding.setSourceMapping(target, uiS
ourceCode, breakpointManager.defaultMapping); |
247 breakpointManager._debuggerWorkspaceBinding.updateLocations(target.debug
gerModel.scriptForId(url)); | 247 breakpointManager._debuggerWorkspaceBinding.updateLocations(target.debug
gerModel.scriptForId(url)); |
248 } | 248 } |
249 return uiSourceCode; | 249 return uiSourceCode; |
250 } | 250 } |
251 | 251 |
252 InspectorTest.createBreakpointManager = function(targetManager, debuggerWorkspac
eBinding, persistentBreakpoints) | 252 InspectorTest.createBreakpointManager = function(targetManager, debuggerWorkspac
eBinding, persistentBreakpoints) |
253 { | 253 { |
254 InspectorTest._pendingBreakpointUpdates = 0; | 254 InspectorTest._pendingBreakpointUpdates = 0; |
255 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint.pro
totype, "_updateInDebugger", updateInDebugger, true); | 255 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint.pro
totype, "_updateInDebugger", updateInDebugger, true); |
256 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint.pro
totype, "_didUpdateInDebugger", didUpdateInDebugger, true); | 256 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint.pro
totype, "_didUpdateInDebugger", didUpdateInDebugger, true); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 } | 399 } |
400 | 400 |
401 function finish() | 401 function finish() |
402 { | 402 { |
403 InspectorTest.dumpBreakpointLocations(breakpointManager); | 403 InspectorTest.dumpBreakpointLocations(breakpointManager); |
404 next(); | 404 next(); |
405 } | 405 } |
406 } | 406 } |
407 | 407 |
408 } | 408 } |
OLD | NEW |