| OLD | NEW |
| 1 var initialize_HeapSnapshotTest = function() { | 1 var initialize_HeapSnapshotTest = function() { |
| 2 | 2 |
| 3 InspectorTest.preloadPanel("profiles"); | 3 InspectorTest.preloadPanel("profiles"); |
| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 return builder.generateSnapshot(); | 407 return builder.generateSnapshot(); |
| 408 } | 408 } |
| 409 | 409 |
| 410 } | 410 } |
| 411 | 411 |
| 412 InspectorTest.createHeapSnapshotMockFactories(); | 412 InspectorTest.createHeapSnapshotMockFactories(); |
| 413 | 413 |
| 414 | 414 |
| 415 InspectorTest.startProfilerTest = function(callback) | 415 InspectorTest.startProfilerTest = function(callback) |
| 416 { | 416 { |
| 417 WebInspector.settingForTest("showAdvancedHeapSnapshotProperties").set(true); | |
| 418 | |
| 419 InspectorTest.addResult("Profiler was enabled."); | 417 InspectorTest.addResult("Profiler was enabled."); |
| 420 // 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 |
| 421 // 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
, |
| 422 // so we provide synthetic snapshots. | 420 // so we provide synthetic snapshots. |
| 423 InspectorTest._panelReset = InspectorTest.override(WebInspector.panels.profi
les, "_reset", function(){}, true); | 421 InspectorTest._panelReset = InspectorTest.override(WebInspector.panels.profi
les, "_reset", function(){}, true); |
| 424 InspectorTest.addSniffer(WebInspector.HeapSnapshotView.prototype, "show", In
spectorTest._snapshotViewShown, true); | 422 InspectorTest.addSniffer(WebInspector.HeapSnapshotView.prototype, "show", In
spectorTest._snapshotViewShown, true); |
| 425 | 423 |
| 426 // Reduce the number of populated nodes to speed up testing. | 424 // Reduce the number of populated nodes to speed up testing. |
| 427 WebInspector.HeapSnapshotContainmentDataGrid.prototype.defaultPopulateCount
= function() { return 10; }; | 425 WebInspector.HeapSnapshotContainmentDataGrid.prototype.defaultPopulateCount
= function() { return 10; }; |
| 428 WebInspector.HeapSnapshotConstructorsDataGrid.prototype.defaultPopulateCount
= function() { return 10; }; | 426 WebInspector.HeapSnapshotConstructorsDataGrid.prototype.defaultPopulateCount
= function() { return 10; }; |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 function sortingComplete() | 727 function sortingComplete() |
| 730 { | 728 { |
| 731 dataGrid.removeEventListener(WebInspector.HeapSnapshotSortableDataGr
id.Events.SortingComplete, sortingComplete, null); | 729 dataGrid.removeEventListener(WebInspector.HeapSnapshotSortableDataGr
id.Events.SortingComplete, sortingComplete, null); |
| 732 callback(); | 730 callback(); |
| 733 } | 731 } |
| 734 dataGrid.addEventListener(WebInspector.HeapSnapshotSortableDataGrid.Even
ts.SortingComplete, sortingComplete, null); | 732 dataGrid.addEventListener(WebInspector.HeapSnapshotSortableDataGrid.Even
ts.SortingComplete, sortingComplete, null); |
| 735 } | 733 } |
| 736 }; | 734 }; |
| 737 | 735 |
| 738 }; | 736 }; |
| OLD | NEW |