OLD | NEW |
1 var initialize_DebuggerTest = function() { | 1 var initialize_DebuggerTest = function() { |
2 | 2 |
3 InspectorTest.startDebuggerTest = function(callback, quiet) | 3 InspectorTest.startDebuggerTest = function(callback, quiet) |
4 { | 4 { |
5 if (quiet !== undefined) | 5 if (quiet !== undefined) |
6 InspectorTest._quiet = quiet; | 6 InspectorTest._quiet = quiet; |
7 WebInspector.inspectorView.showPanel("sources"); | 7 WebInspector.inspectorView.showPanel("sources"); |
8 | 8 |
9 if (WebInspector.debuggerModel.debuggerEnabled()) | 9 if (WebInspector.debuggerModel.debuggerEnabled()) |
10 startTest(); | 10 startTest(); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 { | 249 { |
250 var panel = WebInspector.inspectorView.showPanel("sources"); | 250 var panel = WebInspector.inspectorView.showPanel("sources"); |
251 var uiSourceCodes = panel._workspace.uiSourceCodes(); | 251 var uiSourceCodes = panel._workspace.uiSourceCodes(); |
252 for (var i = 0; i < uiSourceCodes.length; ++i) { | 252 for (var i = 0; i < uiSourceCodes.length; ++i) { |
253 if (uiSourceCodes[i].name() === scriptName) { | 253 if (uiSourceCodes[i].name() === scriptName) { |
254 callback(uiSourceCodes[i]); | 254 callback(uiSourceCodes[i]); |
255 return; | 255 return; |
256 } | 256 } |
257 } | 257 } |
258 | 258 |
259 InspectorTest.addSniffer(WebInspector.SourcesPanel.prototype, "_addUISourceC
ode", InspectorTest.waitForScriptSource.bind(InspectorTest, scriptName, callback
)); | 259 InspectorTest.addSniffer(WebInspector.SourcesEditor.prototype, "_addUISource
Code", InspectorTest.waitForScriptSource.bind(InspectorTest, scriptName, callbac
k)); |
260 }; | 260 }; |
261 | 261 |
262 InspectorTest.dumpNavigatorView = function(navigatorView, id, prefix) | 262 InspectorTest.dumpNavigatorView = function(navigatorView, id, prefix) |
263 { | 263 { |
264 InspectorTest.addResult(prefix + "Dumping ScriptsNavigator " + id + " tab:")
; | 264 InspectorTest.addResult(prefix + "Dumping ScriptsNavigator " + id + " tab:")
; |
265 dumpNavigatorTreeOutline(prefix, navigatorView._scriptsTree); | 265 dumpNavigatorTreeOutline(prefix, navigatorView._scriptsTree); |
266 | 266 |
267 function dumpNavigatorTreeElement(prefix, treeElement) | 267 function dumpNavigatorTreeElement(prefix, treeElement) |
268 { | 268 { |
269 InspectorTest.addResult(prefix + treeElement.titleText); | 269 InspectorTest.addResult(prefix + treeElement.titleText); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 InspectorTest.checkUILocation = function(uiSourceCode, lineNumber, columnNumber,
location) | 386 InspectorTest.checkUILocation = function(uiSourceCode, lineNumber, columnNumber,
location) |
387 { | 387 { |
388 InspectorTest.assertEquals(uiSourceCode, location.uiSourceCode, "Incorrect u
iSourceCode, expected '" + (uiSourceCode ? uiSourceCode.originURL() : null) + "'
," + | 388 InspectorTest.assertEquals(uiSourceCode, location.uiSourceCode, "Incorrect u
iSourceCode, expected '" + (uiSourceCode ? uiSourceCode.originURL() : null) + "'
," + |
389 " but got '"
+ (location.uiSourceCode ? location.uiSourceCode.originURL() : null) + "'"); | 389 " but got '"
+ (location.uiSourceCode ? location.uiSourceCode.originURL() : null) + "'"); |
390 InspectorTest.assertEquals(lineNumber, location.lineNumber, "Incorrect lineN
umber, expected '" + lineNumber + "', but got '" + location.lineNumber + "'"); | 390 InspectorTest.assertEquals(lineNumber, location.lineNumber, "Incorrect lineN
umber, expected '" + lineNumber + "', but got '" + location.lineNumber + "'"); |
391 InspectorTest.assertEquals(columnNumber, location.columnNumber, "Incorrect c
olumnNumber, expected '" + columnNumber + "', but got '" + location.columnNumber
+ "'"); | 391 InspectorTest.assertEquals(columnNumber, location.columnNumber, "Incorrect c
olumnNumber, expected '" + columnNumber + "', but got '" + location.columnNumber
+ "'"); |
392 }; | 392 }; |
393 | 393 |
394 InspectorTest.scriptFormatter = function() | 394 InspectorTest.scriptFormatter = function() |
395 { | 395 { |
396 var editorActions = WebInspector.moduleManager.instances(WebInspector.Source
sPanel.EditorAction); | 396 var editorActions = WebInspector.moduleManager.instances(WebInspector.Source
sEditor.EditorAction); |
397 for (var i = 0; i < editorActions.length; ++i) { | 397 for (var i = 0; i < editorActions.length; ++i) { |
398 if (editorActions[i] instanceof WebInspector.ScriptFormatterEditorAction
) | 398 if (editorActions[i] instanceof WebInspector.ScriptFormatterEditorAction
) |
399 return editorActions[i]; | 399 return editorActions[i]; |
400 } | 400 } |
401 }; | 401 }; |
402 | 402 |
403 }; | 403 }; |
OLD | NEW |