| 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 InspectorTest.dumpJavaScriptSourceFrameBreakpoints = function(sourceFrame) | 698 InspectorTest.dumpJavaScriptSourceFrameBreakpoints = function(sourceFrame) |
| 699 { | 699 { |
| 700 var textEditor = sourceFrame._textEditor; | 700 var textEditor = sourceFrame._textEditor; |
| 701 for (var lineNumber = 0; lineNumber < textEditor.linesCount; ++lineNumber) { | 701 for (var lineNumber = 0; lineNumber < textEditor.linesCount; ++lineNumber) { |
| 702 if (!textEditor.hasLineClass(lineNumber, "cm-breakpoint")) | 702 if (!textEditor.hasLineClass(lineNumber, "cm-breakpoint")) |
| 703 continue; | 703 continue; |
| 704 var disabled = textEditor.hasLineClass(lineNumber, "cm-breakpoint-disabl
ed"); | 704 var disabled = textEditor.hasLineClass(lineNumber, "cm-breakpoint-disabl
ed"); |
| 705 var conditional = textEditor.hasLineClass(lineNumber, "cm-breakpoint-con
ditional") | 705 var conditional = textEditor.hasLineClass(lineNumber, "cm-breakpoint-con
ditional") |
| 706 InspectorTest.addResult("breakpoint at " + lineNumber + (disabled ? " di
sabled" : "") + (conditional ? " conditional" : "")); | 706 InspectorTest.addResult("breakpoint at " + lineNumber + (disabled ? " di
sabled" : "") + (conditional ? " conditional" : "")); |
| 707 | 707 |
| 708 var range = new Common.TextRange(lineNumber, 0, lineNumber, textEditor.l
ine(lineNumber).length); | 708 var range = new TextUtils.TextRange(lineNumber, 0, lineNumber, textEdito
r.line(lineNumber).length); |
| 709 var bookmarks = textEditor.bookmarks(range, Sources.JavaScriptSourceFram
e.BreakpointDecoration._bookmarkSymbol); | 709 var bookmarks = textEditor.bookmarks(range, Sources.JavaScriptSourceFram
e.BreakpointDecoration._bookmarkSymbol); |
| 710 bookmarks = bookmarks.filter(bookmark => !!bookmark.position()); | 710 bookmarks = bookmarks.filter(bookmark => !!bookmark.position()); |
| 711 bookmarks.sort((bookmark1, bookmark2) => bookmark1.position().startColum
n - bookmark2.position().startColumn); | 711 bookmarks.sort((bookmark1, bookmark2) => bookmark1.position().startColum
n - bookmark2.position().startColumn); |
| 712 for (var bookmark of bookmarks) { | 712 for (var bookmark of bookmarks) { |
| 713 var position = bookmark.position(); | 713 var position = bookmark.position(); |
| 714 var element = bookmark[Sources.JavaScriptSourceFrame.BreakpointDecor
ation._elementSymbolForTest]; | 714 var element = bookmark[Sources.JavaScriptSourceFrame.BreakpointDecor
ation._elementSymbolForTest]; |
| 715 var disabled = element.classList.contains("cm-inline-disabled"); | 715 var disabled = element.classList.contains("cm-inline-disabled"); |
| 716 var conditional = element.classList.contains("cm-inline-conditional"
); | 716 var conditional = element.classList.contains("cm-inline-conditional"
); |
| 717 InspectorTest.addResult(" inline breakpoint at (" + position.startL
ine + ", " + position.startColumn + ")" + (disabled ? " disabled" : "") + (condi
tional ? " conditional" : "")); | 717 InspectorTest.addResult(" inline breakpoint at (" + position.startL
ine + ", " + position.startColumn + ")" + (disabled ? " disabled" : "") + (condi
tional ? " conditional" : "")); |
| 718 } | 718 } |
| 719 } | 719 } |
| 720 } | 720 } |
| 721 | 721 |
| 722 InspectorTest.clickJavaScriptSourceFrameBreakpoint = function(sourceFrame, lineN
umber, index, next) | 722 InspectorTest.clickJavaScriptSourceFrameBreakpoint = function(sourceFrame, lineN
umber, index, next) |
| 723 { | 723 { |
| 724 var textEditor = sourceFrame._textEditor; | 724 var textEditor = sourceFrame._textEditor; |
| 725 var lineLength = textEditor.line(lineNumber).length; | 725 var lineLength = textEditor.line(lineNumber).length; |
| 726 var lineRange = new Common.TextRange(lineNumber, 0, lineNumber, lineLength); | 726 var lineRange = new TextUtils.TextRange(lineNumber, 0, lineNumber, lineLengt
h); |
| 727 var bookmarks = textEditor.bookmarks(lineRange, Sources.JavaScriptSourceFram
e.BreakpointDecoration._bookmarkSymbol); | 727 var bookmarks = textEditor.bookmarks(lineRange, Sources.JavaScriptSourceFram
e.BreakpointDecoration._bookmarkSymbol); |
| 728 bookmarks.sort((bookmark1, bookmark2) => bookmark1.position().startColumn -
bookmark2.position().startColumn); | 728 bookmarks.sort((bookmark1, bookmark2) => bookmark1.position().startColumn -
bookmark2.position().startColumn); |
| 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 |