| OLD | NEW |
| 1 var initialize_HeapSnapshotTest = function() { | 1 var initialize_HeapSnapshotTest = function() { |
| 2 | 2 |
| 3 InspectorTest.preloadPanel("heap_profiler"); | 3 InspectorTest.preloadPanel("heap_profiler"); |
| 4 | 4 |
| 5 InspectorTest.createHeapSnapshotMockFactories = function() { | 5 InspectorTest.createHeapSnapshotMockFactories = function() { |
| 6 | 6 |
| 7 InspectorTest.createJSHeapSnapshotMockObject = function() | 7 InspectorTest.createJSHeapSnapshotMockObject = function() |
| 8 { | 8 { |
| 9 return { | 9 return { |
| 10 _rootNodeIndex: 0, | 10 _rootNodeIndex: 0, |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 view._changePerspectiveAndWait(title, callback); | 680 view._changePerspectiveAndWait(title, callback); |
| 681 // Increase the grid container height so the viewport don't limit the number
of nodes. | 681 // Increase the grid container height so the viewport don't limit the number
of nodes. |
| 682 InspectorTest._currentGrid().scrollContainer.style.height = "10000px"; | 682 InspectorTest._currentGrid().scrollContainer.style.height = "10000px"; |
| 683 }; | 683 }; |
| 684 | 684 |
| 685 InspectorTest.takeAndOpenSnapshot = function(generator, callback) | 685 InspectorTest.takeAndOpenSnapshot = function(generator, callback) |
| 686 { | 686 { |
| 687 callback = InspectorTest.safeWrap(callback); | 687 callback = InspectorTest.safeWrap(callback); |
| 688 var snapshot = generator(); | 688 var snapshot = generator(); |
| 689 var profileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotProfileT
ype; | 689 var profileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotProfileT
ype; |
| 690 function pushGeneratedSnapshot(reportProgress, callback2) | 690 function pushGeneratedSnapshot(reportProgress) |
| 691 { | 691 { |
| 692 var profile = profileType.profileBeingRecorded(); | 692 var profile = profileType.profileBeingRecorded(); |
| 693 if (reportProgress) { | 693 if (reportProgress) { |
| 694 profileType._reportHeapSnapshotProgress({data: {done: 50, total: 100
, finished: false}}); | 694 profileType._reportHeapSnapshotProgress({data: {done: 50, total: 100
, finished: false}}); |
| 695 profileType._reportHeapSnapshotProgress({data: {done: 100, total: 10
0, finished: true}}); | 695 profileType._reportHeapSnapshotProgress({data: {done: 100, total: 10
0, finished: true}}); |
| 696 } | 696 } |
| 697 snapshot.snapshot.typeId = "HEAP"; | 697 snapshot.snapshot.typeId = "HEAP"; |
| 698 profileType._addHeapSnapshotChunk({data: JSON.stringify(snapshot)}); | 698 profileType._addHeapSnapshotChunk({data: JSON.stringify(snapshot)}); |
| 699 return Promise.resolve(callback2(null)); | 699 return Promise.resolve(); |
| 700 } | 700 } |
| 701 InspectorTest.override(InspectorTest.HeapProfilerAgent, "takeHeapSnapshot",
pushGeneratedSnapshot); | 701 InspectorTest.override(InspectorTest.HeapProfilerAgent, "takeHeapSnapshot",
pushGeneratedSnapshot); |
| 702 InspectorTest._takeAndOpenSnapshotCallback = callback; | 702 InspectorTest._takeAndOpenSnapshotCallback = callback; |
| 703 profileType._takeHeapSnapshot(function() { }); | 703 profileType._takeHeapSnapshot(); |
| 704 }; | 704 }; |
| 705 | 705 |
| 706 InspectorTest.viewColumns = function() | 706 InspectorTest.viewColumns = function() |
| 707 { | 707 { |
| 708 return InspectorTest._currentGrid()._columnsArray; | 708 return InspectorTest._currentGrid()._columnsArray; |
| 709 }; | 709 }; |
| 710 | 710 |
| 711 InspectorTest.currentProfileView = function() | 711 InspectorTest.currentProfileView = function() |
| 712 { | 712 { |
| 713 return UI.panels.heap_profiler.visibleView; | 713 return UI.panels.heap_profiler.visibleView; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 727 function sortingComplete() | 727 function sortingComplete() |
| 728 { | 728 { |
| 729 dataGrid.removeEventListener(Profiler.HeapSnapshotSortableDataGrid.E
vents.SortingComplete, sortingComplete, null); | 729 dataGrid.removeEventListener(Profiler.HeapSnapshotSortableDataGrid.E
vents.SortingComplete, sortingComplete, null); |
| 730 callback(); | 730 callback(); |
| 731 } | 731 } |
| 732 dataGrid.addEventListener(Profiler.HeapSnapshotSortableDataGrid.Events.S
ortingComplete, sortingComplete, null); | 732 dataGrid.addEventListener(Profiler.HeapSnapshotSortableDataGrid.Events.S
ortingComplete, sortingComplete, null); |
| 733 } | 733 } |
| 734 }; | 734 }; |
| 735 | 735 |
| 736 }; | 736 }; |
| OLD | NEW |