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(InspectorTest.debuggerModel.debuggerEnabled(), "Debugger has
to 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(); |
11 | 11 |
12 InspectorTest.addSniffer(WebInspector.debuggerModel, "_pausedScript", Inspec
torTest._pausedScript, true); | 12 InspectorTest.addSniffer(InspectorTest.debuggerModel, "_pausedScript", Inspe
ctorTest._pausedScript, true); |
13 InspectorTest.addSniffer(WebInspector.debuggerModel, "_resumedScript", Inspe
ctorTest._resumedScript, true); | 13 InspectorTest.addSniffer(InspectorTest.debuggerModel, "_resumedScript", Insp
ectorTest._resumedScript, true); |
14 InspectorTest.safeWrap(callback)(); | 14 InspectorTest.safeWrap(callback)(); |
15 }; | 15 }; |
16 | 16 |
17 InspectorTest.completeDebuggerTest = function() | 17 InspectorTest.completeDebuggerTest = function() |
18 { | 18 { |
19 WebInspector.breakpointManager.setBreakpointsActive(true); | 19 WebInspector.breakpointManager.setBreakpointsActive(true); |
20 InspectorTest.resumeExecution(InspectorTest.completeTest.bind(InspectorTest)
); | 20 InspectorTest.resumeExecution(InspectorTest.completeTest.bind(InspectorTest)
); |
21 }; | 21 }; |
22 | 22 |
23 (function() { | 23 (function() { |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace
, options) | 246 InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace
, options) |
247 { | 247 { |
248 var results = []; | 248 var results = []; |
249 options = options || {}; | 249 options = options || {}; |
250 | 250 |
251 function printCallFrames(callFrames) | 251 function printCallFrames(callFrames) |
252 { | 252 { |
253 var printed = 0; | 253 var printed = 0; |
254 for (var i = 0; i < callFrames.length; i++) { | 254 for (var i = 0; i < callFrames.length; i++) { |
255 var frame = callFrames[i]; | 255 var frame = callFrames[i]; |
256 var script = WebInspector.debuggerModel.scriptForId(frame.location()
.scriptId); | 256 var script = InspectorTest.debuggerModel.scriptForId(frame.location(
).scriptId); |
257 var isFramework = WebInspector.BlackboxSupport.isBlackboxedURL(scrip
t.sourceURL); | 257 var isFramework = WebInspector.BlackboxSupport.isBlackboxedURL(scrip
t.sourceURL); |
258 if (options.dropFrameworkCallFrames && isFramework) | 258 if (options.dropFrameworkCallFrames && isFramework) |
259 continue; | 259 continue; |
260 var url; | 260 var url; |
261 var lineNumber; | 261 var lineNumber; |
262 if (script) { | 262 if (script) { |
263 url = WebInspector.displayNameForURL(script.sourceURL); | 263 url = WebInspector.displayNameForURL(script.sourceURL); |
264 lineNumber = frame.location().lineNumber + 1; | 264 lineNumber = frame.location().lineNumber + 1; |
265 } else { | 265 } else { |
266 url = "(internal script)"; | 266 url = "(internal script)"; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 }; | 457 }; |
458 | 458 |
459 InspectorTest.setQuiet = function(quiet) | 459 InspectorTest.setQuiet = function(quiet) |
460 { | 460 { |
461 InspectorTest._quiet = quiet; | 461 InspectorTest._quiet = quiet; |
462 }; | 462 }; |
463 | 463 |
464 InspectorTest.queryScripts = function(filter) | 464 InspectorTest.queryScripts = function(filter) |
465 { | 465 { |
466 var scripts = []; | 466 var scripts = []; |
467 for (var scriptId in WebInspector.debuggerModel._scripts) { | 467 for (var scriptId in InspectorTest.debuggerModel._scripts) { |
468 var script = WebInspector.debuggerModel._scripts[scriptId]; | 468 var script = InspectorTest.debuggerModel._scripts[scriptId]; |
469 if (!filter || filter(script)) | 469 if (!filter || filter(script)) |
470 scripts.push(script); | 470 scripts.push(script); |
471 } | 471 } |
472 return scripts; | 472 return scripts; |
473 }; | 473 }; |
474 | 474 |
475 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent
Script, source, target, preRegisterCallback) | 475 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent
Script, source, target, preRegisterCallback) |
476 { | 476 { |
477 target = target || WebInspector.targetManager.mainTarget(); | 477 target = target || WebInspector.targetManager.mainTarget(); |
478 var scriptId = ++InspectorTest._lastScriptId; | 478 var scriptId = ++InspectorTest._lastScriptId; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 return self.runtime.instancesPromise(WebInspector.SourcesView.EditorAction).
then(function(editorActions) { | 514 return self.runtime.instancesPromise(WebInspector.SourcesView.EditorAction).
then(function(editorActions) { |
515 for (var i = 0; i < editorActions.length; ++i) { | 515 for (var i = 0; i < editorActions.length; ++i) { |
516 if (editorActions[i] instanceof WebInspector.ScriptFormatterEditorAc
tion) | 516 if (editorActions[i] instanceof WebInspector.ScriptFormatterEditorAc
tion) |
517 return editorActions[i]; | 517 return editorActions[i]; |
518 } | 518 } |
519 return null; | 519 return null; |
520 }); | 520 }); |
521 }; | 521 }; |
522 | 522 |
523 }; | 523 }; |
OLD | NEW |