| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 { | 647 { |
| 648 var threadsPane = self.runtime.sharedInstance(Sources.ThreadsSidebarPane); | 648 var threadsPane = self.runtime.sharedInstance(Sources.ThreadsSidebarPane); |
| 649 threadsPane._list.selectItem(target.model(SDK.DebuggerModel)); | 649 threadsPane._list.selectItem(target.model(SDK.DebuggerModel)); |
| 650 } | 650 } |
| 651 | 651 |
| 652 InspectorTest.evaluateOnCurrentCallFrame = function(code) | 652 InspectorTest.evaluateOnCurrentCallFrame = function(code) |
| 653 { | 653 { |
| 654 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal
lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ))
); | 654 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal
lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ))
); |
| 655 } | 655 } |
| 656 | 656 |
| 657 InspectorTest.prepareSourceFrameForBreakpointTest = function(sourceFrame) | |
| 658 { | |
| 659 var symbol = Symbol('waitedDecorations'); | |
| 660 sourceFrame[symbol] = 0; | |
| 661 InspectorTest.addSniffer(sourceFrame.__proto__, "_willAddInlineDecorationsFo
rTest", () => sourceFrame[symbol]++, true); | |
| 662 InspectorTest.addSniffer(sourceFrame.__proto__, "_didAddInlineDecorationsFor
Test", (updateWasScheduled) => { | |
| 663 sourceFrame[symbol]--; | |
| 664 if (!updateWasScheduled) | |
| 665 sourceFrame._breakpointDecorationsUpdatedForTest(); | |
| 666 }, true); | |
| 667 sourceFrame._waitingForPossibleLocationsForTest = () => !!sourceFrame[symbol
]; | |
| 668 } | |
| 669 | |
| 670 InspectorTest.waitJavaScriptSourceFrameBreakpoints = function(sourceFrame, inlin
e) | 657 InspectorTest.waitJavaScriptSourceFrameBreakpoints = function(sourceFrame, inlin
e) |
| 671 { | 658 { |
| 672 if (!sourceFrame._waitingForPossibleLocationsForTest) { | |
| 673 InspectorTest.addResult("Error: source frame should be prepared with Ins
pectorTest.prepareSourceFrameForBreakpointTest function."); | |
| 674 InspectorTest.completeTest(); | |
| 675 return; | |
| 676 } | |
| 677 return waitUpdate().then(checkIfReady); | 659 return waitUpdate().then(checkIfReady); |
| 678 function waitUpdate() | 660 function waitUpdate() |
| 679 { | 661 { |
| 680 return new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__pro
to__, "_breakpointDecorationsUpdatedForTest", resolve)); | 662 return new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__pro
to__, "_breakpointDecorationsUpdatedForTest", resolve)); |
| 681 } | 663 } |
| 682 function checkIfReady() | 664 function checkIfReady() |
| 683 { | 665 { |
| 684 if (sourceFrame._waitingForPossibleLocationsForTest()) | |
| 685 return waitUpdate().then(checkIfReady); | |
| 686 for (var breakpoint of Bindings.breakpointManager._allBreakpoints()) { | 666 for (var breakpoint of Bindings.breakpointManager._allBreakpoints()) { |
| 687 if (breakpoint._fakePrimaryLocation && breakpoint.enabled()) | 667 if (breakpoint._fakePrimaryLocation && breakpoint.enabled()) |
| 688 return waitUpdate().then(checkIfReady); | 668 return waitUpdate().then(checkIfReady); |
| 689 } | 669 } |
| 690 return Promise.resolve(); | 670 return Promise.resolve(); |
| 691 } | 671 } |
| 692 } | 672 } |
| 693 | 673 |
| 694 InspectorTest.dumpJavaScriptSourceFrameBreakpoints = function(sourceFrame) | 674 InspectorTest.dumpJavaScriptSourceFrameBreakpoints = function(sourceFrame) |
| 695 { | 675 { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 if (targetName) | 718 if (targetName) |
| 739 auxData.targetName = targetName; | 719 auxData.targetName = targetName; |
| 740 var breakpoint = SDK.domDebuggerManager.resolveEventListenerBreakpoint(auxDa
ta); | 720 var breakpoint = SDK.domDebuggerManager.resolveEventListenerBreakpoint(auxDa
ta); |
| 741 if (breakpoint.enabled() !== enabled) { | 721 if (breakpoint.enabled() !== enabled) { |
| 742 pane._breakpoints.get(breakpoint).checkbox.checked = enabled; | 722 pane._breakpoints.get(breakpoint).checkbox.checked = enabled; |
| 743 pane._breakpointCheckboxClicked(breakpoint); | 723 pane._breakpointCheckboxClicked(breakpoint); |
| 744 } | 724 } |
| 745 } | 725 } |
| 746 | 726 |
| 747 }; | 727 }; |
| OLD | NEW |