| OLD | NEW |
| 1 var initialize_DebuggerTest = function() { | 1 var initialize_DebuggerTest = function() { |
| 2 | 2 |
| 3 InspectorTest.preloadPanel("sources"); | 3 InspectorTest.preloadPanel("sources"); |
| 4 | 4 |
| 5 InspectorTest.startDebuggerTest = function(callback, quiet) | 5 InspectorTest.startDebuggerTest = function(callback, quiet) |
| 6 { | 6 { |
| 7 console.assert(WebInspector.debuggerModel.debuggerEnabled(), "Debugger has t
o be enabled"); | 7 console.assert(WebInspector.debuggerModel.debuggerEnabled(), "Debugger has t
o be enabled"); |
| 8 if (quiet !== undefined) | 8 if (quiet !== undefined) |
| 9 InspectorTest._quiet = quiet; | 9 InspectorTest._quiet = quiet; |
| 10 WebInspector.SourcesPanel.show(); | 10 WebInspector.SourcesPanel.show(); |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 InspectorTest.showScriptSource = function(scriptName, callback) | 304 InspectorTest.showScriptSource = function(scriptName, callback) |
| 305 { | 305 { |
| 306 InspectorTest.waitForScriptSource(scriptName, function(uiSourceCode) { Inspe
ctorTest.showUISourceCode(uiSourceCode, callback); }); | 306 InspectorTest.waitForScriptSource(scriptName, function(uiSourceCode) { Inspe
ctorTest.showUISourceCode(uiSourceCode, callback); }); |
| 307 }; | 307 }; |
| 308 | 308 |
| 309 InspectorTest.waitForScriptSource = function(scriptName, callback) | 309 InspectorTest.waitForScriptSource = function(scriptName, callback) |
| 310 { | 310 { |
| 311 var panel = WebInspector.panels.sources; | 311 var panel = WebInspector.panels.sources; |
| 312 var uiSourceCodes = panel._workspace.uiSourceCodes(); | 312 var uiSourceCodes = panel._workspace.uiSourceCodes(); |
| 313 for (var i = 0; i < uiSourceCodes.length; ++i) { | 313 for (var i = 0; i < uiSourceCodes.length; ++i) { |
| 314 if (uiSourceCodes[i].project().type() === WebInspector.projectTypes.Serv
ice) |
| 315 continue; |
| 314 if (uiSourceCodes[i].name() === scriptName) { | 316 if (uiSourceCodes[i].name() === scriptName) { |
| 315 callback(uiSourceCodes[i]); | 317 callback(uiSourceCodes[i]); |
| 316 return; | 318 return; |
| 317 } | 319 } |
| 318 } | 320 } |
| 319 | 321 |
| 320 InspectorTest.addSniffer(WebInspector.SourcesView.prototype, "_addUISourceCo
de", InspectorTest.waitForScriptSource.bind(InspectorTest, scriptName, callback)
); | 322 InspectorTest.addSniffer(WebInspector.SourcesView.prototype, "_addUISourceCo
de", InspectorTest.waitForScriptSource.bind(InspectorTest, scriptName, callback)
); |
| 321 }; | 323 }; |
| 322 | 324 |
| 323 InspectorTest.dumpNavigatorView = function(navigatorView, id, prefix) | 325 InspectorTest.dumpNavigatorView = function(navigatorView, id, prefix) |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 return self.runtime.instancesPromise(WebInspector.SourcesView.EditorAction).
then(function(editorActions) { | 462 return self.runtime.instancesPromise(WebInspector.SourcesView.EditorAction).
then(function(editorActions) { |
| 461 for (var i = 0; i < editorActions.length; ++i) { | 463 for (var i = 0; i < editorActions.length; ++i) { |
| 462 if (editorActions[i] instanceof WebInspector.ScriptFormatterEditorAc
tion) | 464 if (editorActions[i] instanceof WebInspector.ScriptFormatterEditorAc
tion) |
| 463 return editorActions[i]; | 465 return editorActions[i]; |
| 464 } | 466 } |
| 465 return null; | 467 return null; |
| 466 }); | 468 }); |
| 467 }; | 469 }; |
| 468 | 470 |
| 469 }; | 471 }; |
| OLD | NEW |