| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 // We mock out HeapProfilerAgent -- as DRT runs in single-process mode, Insp
ector | 418 // We mock out HeapProfilerAgent -- as DRT runs in single-process mode, Insp
ector |
| 419 // and test share the same heap. Taking a snapshot takes too long for a test
, | 419 // and test share the same heap. Taking a snapshot takes too long for a test
, |
| 420 // so we provide synthetic snapshots. | 420 // so we provide synthetic snapshots. |
| 421 InspectorTest._panelReset = InspectorTest.override(WebInspector.panels.profi
les, "_reset", function(){}, true); | 421 InspectorTest._panelReset = InspectorTest.override(WebInspector.panels.profi
les, "_reset", function(){}, true); |
| 422 InspectorTest.addSniffer(WebInspector.HeapSnapshotView.prototype, "show", In
spectorTest._snapshotViewShown, true); | 422 InspectorTest.addSniffer(WebInspector.HeapSnapshotView.prototype, "show", In
spectorTest._snapshotViewShown, true); |
| 423 | 423 |
| 424 // Reduce the number of populated nodes to speed up testing. | 424 // Reduce the number of populated nodes to speed up testing. |
| 425 WebInspector.HeapSnapshotContainmentDataGrid.prototype.defaultPopulateCount
= function() { return 10; }; | 425 WebInspector.HeapSnapshotContainmentDataGrid.prototype.defaultPopulateCount
= function() { return 10; }; |
| 426 WebInspector.HeapSnapshotConstructorsDataGrid.prototype.defaultPopulateCount
= function() { return 10; }; | 426 WebInspector.HeapSnapshotConstructorsDataGrid.prototype.defaultPopulateCount
= function() { return 10; }; |
| 427 WebInspector.HeapSnapshotDiffDataGrid.prototype.defaultPopulateCount = funct
ion() { return 5; }; | 427 WebInspector.HeapSnapshotDiffDataGrid.prototype.defaultPopulateCount = funct
ion() { return 5; }; |
| 428 WebInspector.HeapSnapshotDominatorsDataGrid.prototype.defaultPopulateCount =
function() { return 3; } | |
| 429 InspectorTest.addResult("Detailed heap profiles were enabled."); | 428 InspectorTest.addResult("Detailed heap profiles were enabled."); |
| 430 InspectorTest.safeWrap(callback)(); | 429 InspectorTest.safeWrap(callback)(); |
| 431 }; | 430 }; |
| 432 | 431 |
| 433 InspectorTest.completeProfilerTest = function() | 432 InspectorTest.completeProfilerTest = function() |
| 434 { | 433 { |
| 435 // There is no way to disable detailed heap profiles. | 434 // There is no way to disable detailed heap profiles. |
| 436 InspectorTest.addResult(""); | 435 InspectorTest.addResult(""); |
| 437 InspectorTest.addResult("Profiler was disabled."); | 436 InspectorTest.addResult("Profiler was disabled."); |
| 438 InspectorTest.completeTest(); | 437 InspectorTest.completeTest(); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 function sortingComplete() | 725 function sortingComplete() |
| 727 { | 726 { |
| 728 dataGrid.removeEventListener(WebInspector.HeapSnapshotSortableDataGr
id.Events.SortingComplete, sortingComplete, null); | 727 dataGrid.removeEventListener(WebInspector.HeapSnapshotSortableDataGr
id.Events.SortingComplete, sortingComplete, null); |
| 729 callback(); | 728 callback(); |
| 730 } | 729 } |
| 731 dataGrid.addEventListener(WebInspector.HeapSnapshotSortableDataGrid.Even
ts.SortingComplete, sortingComplete, null); | 730 dataGrid.addEventListener(WebInspector.HeapSnapshotSortableDataGrid.Even
ts.SortingComplete, sortingComplete, null); |
| 732 } | 731 } |
| 733 }; | 732 }; |
| 734 | 733 |
| 735 }; | 734 }; |
| OLD | NEW |