| OLD | NEW |
| 1 var initialize_HeapSnapshotTest = function() { | 1 var initialize_HeapSnapshotTest = function() { |
| 2 | 2 |
| 3 InspectorTest.createJSHeapSnapshotMockObject = function() | 3 InspectorTest.createJSHeapSnapshotMockObject = function() |
| 4 { | 4 { |
| 5 return { | 5 return { |
| 6 _rootNodeIndex: 0, | 6 _rootNodeIndex: 0, |
| 7 _nodeTypeOffset: 0, | 7 _nodeTypeOffset: 0, |
| 8 _nodeNameOffset: 1, | 8 _nodeNameOffset: 1, |
| 9 _nodeEdgeCountOffset: 2, | 9 _nodeEdgeCountOffset: 2, |
| 10 _nodeFieldCount: 3, | 10 _nodeFieldCount: 3, |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 callback = InspectorTest.safeWrap(callback); | 687 callback = InspectorTest.safeWrap(callback); |
| 688 var uid = InspectorTest._nextUid++; | 688 var uid = InspectorTest._nextUid++; |
| 689 var snapshot = generator(); | 689 var snapshot = generator(); |
| 690 var profileType = WebInspector.panels.profiles.getProfileType(WebInspector.H
eapSnapshotProfileType.TypeId); | 690 var profileType = WebInspector.panels.profiles.getProfileType(WebInspector.H
eapSnapshotProfileType.TypeId); |
| 691 var profile = profileType.createProfile({ | 691 var profile = profileType.createProfile({ |
| 692 title: "Mock snapshot #" + uid, | 692 title: "Mock snapshot #" + uid, |
| 693 uid: uid, | 693 uid: uid, |
| 694 maxJSObjectId: snapshot.maxJSObjectId | 694 maxJSObjectId: snapshot.maxJSObjectId |
| 695 }); | 695 }); |
| 696 delete snapshot.maxJSObjectId; | 696 delete snapshot.maxJSObjectId; |
| 697 function pushGeneratedSnapshot(uid) | 697 function pushGeneratedSnapshot(uid, callback) |
| 698 { | 698 { |
| 699 snapshot.snapshot.typeId = "HEAP"; | 699 snapshot.snapshot.typeId = "HEAP"; |
| 700 snapshot.snapshot.title = profile.title; | 700 snapshot.snapshot.title = profile.title; |
| 701 snapshot.snapshot.uid = profile.uid; | 701 snapshot.snapshot.uid = profile.uid; |
| 702 profileType.addHeapSnapshotChunk(uid, JSON.stringify(snapshot)); | 702 profileType.addHeapSnapshotChunk(uid, JSON.stringify(snapshot)); |
| 703 profileType.finishHeapSnapshot(uid); | 703 callback(); |
| 704 } | 704 } |
| 705 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", pushGeneratedSn
apshot); | 705 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", pushGeneratedSn
apshot); |
| 706 InspectorTest._takeAndOpenSnapshotCallback = callback; | 706 InspectorTest._takeAndOpenSnapshotCallback = callback; |
| 707 profileType.addProfile(profile); | 707 profileType.addProfile(profile); |
| 708 WebInspector.panels.profiles._showProfile(profile); | 708 WebInspector.panels.profiles._showProfile(profile); |
| 709 }; | 709 }; |
| 710 | 710 |
| 711 InspectorTest.viewColumns = function() | 711 InspectorTest.viewColumns = function() |
| 712 { | 712 { |
| 713 return InspectorTest._currentGrid()._columnsArray; | 713 return InspectorTest._currentGrid()._columnsArray; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 732 function sortingComplete() | 732 function sortingComplete() |
| 733 { | 733 { |
| 734 dataGrid.removeEventListener("sorting complete", sortingComplete, nu
ll); | 734 dataGrid.removeEventListener("sorting complete", sortingComplete, nu
ll); |
| 735 callback(); | 735 callback(); |
| 736 } | 736 } |
| 737 dataGrid.addEventListener("sorting complete", sortingComplete, null); | 737 dataGrid.addEventListener("sorting complete", sortingComplete, null); |
| 738 } | 738 } |
| 739 }; | 739 }; |
| 740 | 740 |
| 741 }; | 741 }; |
| OLD | NEW |