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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 | 585 |
586 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent
Script, source, target, preRegisterCallback) | 586 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent
Script, source, target, preRegisterCallback) |
587 { | 587 { |
588 target = target || SDK.targetManager.mainTarget(); | 588 target = target || SDK.targetManager.mainTarget(); |
589 var debuggerModel = SDK.DebuggerModel.fromTarget(target); | 589 var debuggerModel = SDK.DebuggerModel.fromTarget(target); |
590 var scriptId = ++InspectorTest._lastScriptId + ""; | 590 var scriptId = ++InspectorTest._lastScriptId + ""; |
591 var lineCount = source.computeLineEndings().length; | 591 var lineCount = source.computeLineEndings().length; |
592 var endLine = startLine + lineCount - 1; | 592 var endLine = startLine + lineCount - 1; |
593 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt
h - source.computeLineEndings()[lineCount - 2]; | 593 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt
h - source.computeLineEndings()[lineCount - 2]; |
594 var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!so
urce.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m); | 594 var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!so
urce.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m); |
595 var script = new SDK.Script(debuggerModel, scriptId, url, startLine, startCo
lumn, endLine, endColumn, 0, "", isContentScript, false, undefined, hasSourceURL
); | 595 var script = new SDK.Script(debuggerModel, scriptId, url, startLine, startCo
lumn, endLine, endColumn, 0, "", isContentScript, false, undefined, hasSourceURL
, source.length); |
596 script.requestContent = function() | 596 script.requestContent = function() |
597 { | 597 { |
598 var trimmedSource = SDK.Script._trimSourceURLComment(source); | 598 var trimmedSource = SDK.Script._trimSourceURLComment(source); |
599 return Promise.resolve(trimmedSource); | 599 return Promise.resolve(trimmedSource); |
600 }; | 600 }; |
601 if (preRegisterCallback) | 601 if (preRegisterCallback) |
602 preRegisterCallback(script); | 602 preRegisterCallback(script); |
603 debuggerModel._registerScript(script); | 603 debuggerModel._registerScript(script); |
604 return script; | 604 return script; |
605 }; | 605 }; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 var bookmark = bookmarks[index]; | 729 var bookmark = bookmarks[index]; |
730 if (bookmark) { | 730 if (bookmark) { |
731 bookmark[Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymb
olForTest].click(); | 731 bookmark[Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymb
olForTest].click(); |
732 } else { | 732 } else { |
733 InspectorTest.addResult(`Could not click on Javascript breakpoint - line
Number: ${lineNumber}, index: ${index}`); | 733 InspectorTest.addResult(`Could not click on Javascript breakpoint - line
Number: ${lineNumber}, index: ${index}`); |
734 next(); | 734 next(); |
735 } | 735 } |
736 } | 736 } |
737 | 737 |
738 }; | 738 }; |
OLD | NEW |