| OLD | NEW |
| 1 function scheduleTestFunction() | 1 function scheduleTestFunction() |
| 2 { | 2 { |
| 3 setTimeout(testFunction, 0); | 3 setTimeout(testFunction, 0); |
| 4 } | 4 } |
| 5 | 5 |
| 6 var initialize_DebuggerTest = function() { | 6 var initialize_DebuggerTest = function() { |
| 7 | 7 |
| 8 InspectorTest.preloadPanel("sources"); | 8 InspectorTest.preloadPanel("sources"); |
| 9 | 9 |
| 10 InspectorTest.startDebuggerTest = function(callback, quiet) | 10 InspectorTest.startDebuggerTest = function(callback, quiet) |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 | 522 |
| 523 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent
Script, source, target, preRegisterCallback) | 523 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent
Script, source, target, preRegisterCallback) |
| 524 { | 524 { |
| 525 target = target || WebInspector.targetManager.mainTarget(); | 525 target = target || WebInspector.targetManager.mainTarget(); |
| 526 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); | 526 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
| 527 var scriptId = ++InspectorTest._lastScriptId + ""; | 527 var scriptId = ++InspectorTest._lastScriptId + ""; |
| 528 var lineCount = source.computeLineEndings().length; | 528 var lineCount = source.computeLineEndings().length; |
| 529 var endLine = startLine + lineCount - 1; | 529 var endLine = startLine + lineCount - 1; |
| 530 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt
h - source.computeLineEndings()[lineCount - 2]; | 530 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt
h - source.computeLineEndings()[lineCount - 2]; |
| 531 var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!so
urce.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m); | 531 var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!so
urce.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m); |
| 532 var script = new WebInspector.Script(debuggerModel, scriptId, url, startLine
, startColumn, endLine, endColumn, 0, "", isContentScript, false, false, undefin
ed, hasSourceURL); | 532 var script = new WebInspector.Script(debuggerModel, scriptId, url, startLine
, startColumn, endLine, endColumn, 0, "", isContentScript, false, undefined, has
SourceURL); |
| 533 script.requestContent = function() | 533 script.requestContent = function() |
| 534 { | 534 { |
| 535 var trimmedSource = WebInspector.Script._trimSourceURLComment(source); | 535 var trimmedSource = WebInspector.Script._trimSourceURLComment(source); |
| 536 return Promise.resolve(trimmedSource); | 536 return Promise.resolve(trimmedSource); |
| 537 }; | 537 }; |
| 538 if (preRegisterCallback) | 538 if (preRegisterCallback) |
| 539 preRegisterCallback(script); | 539 preRegisterCallback(script); |
| 540 debuggerModel._registerScript(script); | 540 debuggerModel._registerScript(script); |
| 541 return script; | 541 return script; |
| 542 }; | 542 }; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 var listItem = threadsPane._debuggerModelToListItems.get(WebInspector.Debugg
erModel.fromTarget(target)); | 590 var listItem = threadsPane._debuggerModelToListItems.get(WebInspector.Debugg
erModel.fromTarget(target)); |
| 591 threadsPane._onListItemClick(listItem); | 591 threadsPane._onListItemClick(listItem); |
| 592 } | 592 } |
| 593 | 593 |
| 594 InspectorTest.evaluateOnCurrentCallFrame = function(code) | 594 InspectorTest.evaluateOnCurrentCallFrame = function(code) |
| 595 { | 595 { |
| 596 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal
lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ))
); | 596 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal
lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ))
); |
| 597 } | 597 } |
| 598 | 598 |
| 599 }; | 599 }; |
| OLD | NEW |