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