| OLD | NEW |
| 1 var initialize_HeapSnapshotTest = function() { | 1 var initialize_HeapSnapshotTest = function() { |
| 2 | 2 |
| 3 InspectorTest.createHeapSnapshotMockFactories = function() { | 3 InspectorTest.createHeapSnapshotMockFactories = function() { |
| 4 | 4 |
| 5 InspectorTest.createJSHeapSnapshotMockObject = function() | 5 InspectorTest.createJSHeapSnapshotMockObject = function() |
| 6 { | 6 { |
| 7 return { | 7 return { |
| 8 _rootNodeIndex: 0, | 8 _rootNodeIndex: 0, |
| 9 _nodeTypeOffset: 0, | 9 _nodeTypeOffset: 0, |
| 10 _nodeNameOffset: 1, | 10 _nodeNameOffset: 1, |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 callback = InspectorTest.safeWrap(callback); | 690 callback = InspectorTest.safeWrap(callback); |
| 691 var view = WebInspector.panels.profiles.visibleView; | 691 var view = WebInspector.panels.profiles.visibleView; |
| 692 view.changeView(title, callback); | 692 view.changeView(title, callback); |
| 693 }; | 693 }; |
| 694 | 694 |
| 695 InspectorTest.takeAndOpenSnapshot = function(generator, callback) | 695 InspectorTest.takeAndOpenSnapshot = function(generator, callback) |
| 696 { | 696 { |
| 697 callback = InspectorTest.safeWrap(callback); | 697 callback = InspectorTest.safeWrap(callback); |
| 698 var uid = InspectorTest._nextUid++; | 698 var uid = InspectorTest._nextUid++; |
| 699 var snapshot = generator(); | 699 var snapshot = generator(); |
| 700 var profileType = WebInspector.panels.profiles.getProfileType(WebInspector.H
eapSnapshotProfileType.TypeId); | 700 var profileType = WebInspector.ProfileTypeRegistry.instance.heapSnapshotPro
fileType; |
| 701 var profile = new WebInspector.HeapProfileHeader(profileType, "Mock snapshot
#" + uid, uid); | 701 var profile = new WebInspector.HeapProfileHeader(profileType, "Mock snapshot
#" + uid, uid); |
| 702 function pushGeneratedSnapshot(uid, callback) | 702 function pushGeneratedSnapshot(uid, callback) |
| 703 { | 703 { |
| 704 snapshot.snapshot.typeId = "HEAP"; | 704 snapshot.snapshot.typeId = "HEAP"; |
| 705 snapshot.snapshot.title = profile.title; | 705 snapshot.snapshot.title = profile.title; |
| 706 snapshot.snapshot.uid = profile.uid; | 706 snapshot.snapshot.uid = profile.uid; |
| 707 profileType.addHeapSnapshotChunk(uid, JSON.stringify(snapshot)); | 707 profileType.addHeapSnapshotChunk(uid, JSON.stringify(snapshot)); |
| 708 setTimeout(callback, 0); | 708 setTimeout(callback, 0); |
| 709 } | 709 } |
| 710 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", pushGeneratedSn
apshot); | 710 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", pushGeneratedSn
apshot); |
| 711 InspectorTest._takeAndOpenSnapshotCallback = callback; | 711 InspectorTest._takeAndOpenSnapshotCallback = callback; |
| 712 profileType.addProfile(profile); | 712 profileType.addProfile(profile); |
| 713 WebInspector.panels.profiles._showProfile(profile); | 713 WebInspector.panels.profiles.showProfile(profile); |
| 714 }; | 714 }; |
| 715 | 715 |
| 716 InspectorTest.viewColumns = function() | 716 InspectorTest.viewColumns = function() |
| 717 { | 717 { |
| 718 return InspectorTest._currentGrid()._columnsArray; | 718 return InspectorTest._currentGrid()._columnsArray; |
| 719 }; | 719 }; |
| 720 | 720 |
| 721 InspectorTest.currentProfileView = function() | 721 InspectorTest.currentProfileView = function() |
| 722 { | 722 { |
| 723 return WebInspector.panels.profiles.visibleView; | 723 return WebInspector.panels.profiles.visibleView; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 737 function sortingComplete() | 737 function sortingComplete() |
| 738 { | 738 { |
| 739 dataGrid.removeEventListener("sorting complete", sortingComplete, nu
ll); | 739 dataGrid.removeEventListener("sorting complete", sortingComplete, nu
ll); |
| 740 callback(); | 740 callback(); |
| 741 } | 741 } |
| 742 dataGrid.addEventListener("sorting complete", sortingComplete, null); | 742 dataGrid.addEventListener("sorting complete", sortingComplete, null); |
| 743 } | 743 } |
| 744 }; | 744 }; |
| 745 | 745 |
| 746 }; | 746 }; |
| OLD | NEW |