| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 { | 418 { |
| 419 if (!sourceFrame._muted) | 419 if (!sourceFrame._muted) |
| 420 sourceFrame._setBreakpoint(lineNumber, 0, condition, enabled); | 420 sourceFrame._setBreakpoint(lineNumber, 0, condition, enabled); |
| 421 }; | 421 }; |
| 422 | 422 |
| 423 InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber) | 423 InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber) |
| 424 { | 424 { |
| 425 sourceFrame._breakpointManager.findBreakpoints(sourceFrame._uiSourceCode, li
neNumber)[0].remove(); | 425 sourceFrame._breakpointManager.findBreakpoints(sourceFrame._uiSourceCode, li
neNumber)[0].remove(); |
| 426 }; | 426 }; |
| 427 | 427 |
| 428 InspectorTest.createNewBreakpoint = function(sourceFrame, lineNumber, condition,
enabled) |
| 429 { |
| 430 var promise = new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__
proto__, "_breakpointWasSetForTest", resolve)); |
| 431 sourceFrame._createNewBreakpoint(lineNumber, condition, enabled); |
| 432 return promise; |
| 433 } |
| 434 |
| 435 InspectorTest.toggleBreakpoint = function(sourceFrame, lineNumber, disableOnly) |
| 436 { |
| 437 if (!sourceFrame._muted) |
| 438 sourceFrame._toggleBreakpoint(lineNumber, disableOnly); |
| 439 }; |
| 440 |
| 428 InspectorTest.waitBreakpointSidebarPane = function() | 441 InspectorTest.waitBreakpointSidebarPane = function() |
| 429 { | 442 { |
| 430 return new Promise(resolve => InspectorTest.addSniffer(Sources.JavaScriptBre
akpointsSidebarPane.prototype, "_didUpdateForTest", resolve)); | 443 return new Promise(resolve => InspectorTest.addSniffer(Sources.JavaScriptBre
akpointsSidebarPane.prototype, "_didUpdateForTest", resolve)); |
| 431 } | 444 } |
| 432 | 445 |
| 433 InspectorTest.breakpointsSidebarPaneContent = function() | 446 InspectorTest.breakpointsSidebarPaneContent = function() |
| 434 { | 447 { |
| 435 var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsS
idebarPane).contentElement; | 448 var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsS
idebarPane).contentElement; |
| 436 var empty = paneElement.querySelector('.gray-info-message'); | 449 var empty = paneElement.querySelector('.gray-info-message'); |
| 437 if (empty) | 450 if (empty) |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 var threadsPane = self.runtime.sharedInstance(Sources.ThreadsSidebarPane); | 622 var threadsPane = self.runtime.sharedInstance(Sources.ThreadsSidebarPane); |
| 610 var listItem = threadsPane._listItemForTarget(target); | 623 var listItem = threadsPane._listItemForTarget(target); |
| 611 threadsPane._onListItemClick(listItem); | 624 threadsPane._onListItemClick(listItem); |
| 612 } | 625 } |
| 613 | 626 |
| 614 InspectorTest.evaluateOnCurrentCallFrame = function(code) | 627 InspectorTest.evaluateOnCurrentCallFrame = function(code) |
| 615 { | 628 { |
| 616 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal
lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ))
); | 629 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal
lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ))
); |
| 617 } | 630 } |
| 618 | 631 |
| 632 InspectorTest.waitJavaScriptSourceFrameBreakpoints = function(sourceFrame) |
| 633 { |
| 634 return new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__proto__
, "_breakpointDecorationsUpdatedForTest", resolveIfAllBreakpointsResolved.bind(n
ull, resolve))); |
| 635 |
| 636 function resolveIfAllBreakpointsResolved(resolve) |
| 637 { |
| 638 for (var breakpoint of Bindings.breakpointManager._allBreakpoints()) { |
| 639 if (breakpoint._fakePrimaryLocation && breakpoint.enabled()) { |
| 640 InspectorTest.addSniffer(sourceFrame.__proto__, "_breakpointDeco
rationsUpdatedForTest", resolveIfAllBreakpointsResolved.bind(null, resolve)); |
| 641 return; |
| 642 } |
| 643 } |
| 644 resolve(); |
| 645 } |
| 646 } |
| 647 |
| 648 InspectorTest.dumpJavaScriptSourceFrameBreakpoints = function(sourceFrame) |
| 649 { |
| 650 var textEditor = sourceFrame._textEditor; |
| 651 for (var lineNumber = 0; lineNumber < textEditor.linesCount; ++lineNumber) { |
| 652 if (!textEditor.hasLineClass(lineNumber, "cm-breakpoint")) |
| 653 continue; |
| 654 var disabled = textEditor.hasLineClass(lineNumber, "cm-breakpoint-disabl
ed"); |
| 655 var conditional = textEditor.hasLineClass(lineNumber, "cm-breakpoint-con
ditional") |
| 656 InspectorTest.addResult("breakpoint at " + lineNumber + (disabled ? " di
sabled" : "") + (conditional ? " conditional" : "")); |
| 657 } |
| 658 } |
| 659 |
| 619 }; | 660 }; |
| OLD | NEW |