Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane_test.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/iteration_helpers.html"> 8 <link rel="import" href="/tracing/base/iteration_helpers.html">
9 <link rel="import" href="/tracing/core/test_utils.html"> 9 <link rel="import" href="/tracing/core/test_utils.html">
10 <link rel="import" href="/tracing/model/container_memory_dump.html"> 10 <link rel="import" href="/tracing/model/container_memory_dump.html">
(...skipping 22 matching lines...) Expand all
33 var checkStringFields = tr.ui.analysis.checkStringFields; 33 var checkStringFields = tr.ui.analysis.checkStringFields;
34 var checkColumns = tr.ui.analysis.checkColumns; 34 var checkColumns = tr.ui.analysis.checkColumns;
35 var isElementDisplayed = tr.ui.analysis.isElementDisplayed; 35 var isElementDisplayed = tr.ui.analysis.isElementDisplayed;
36 var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED; 36 var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;
37 37
38 function createVMRegions() { 38 function createVMRegions() {
39 var model = tr.c.TestUtils.newModel(function(model) { 39 var model = tr.c.TestUtils.newModel(function(model) {
40 var process = model.getOrCreateProcess(1); 40 var process = model.getOrCreateProcess(1);
41 41
42 // First timestamp. 42 // First timestamp.
43 var gmd1 = addGlobalMemoryDump(model, 42, DETAILED); 43 var gmd1 = addGlobalMemoryDump(model, {ts: 42, levelOfDetail: DETAILED});
44 var pmd1 = addProcessMemoryDump(gmd1, process, 42); 44 var pmd1 = addProcessMemoryDump(gmd1, process, {ts: 42});
45 pmd1.vmRegions = VMRegionClassificationNode.fromRegions([ 45 pmd1.vmRegions = VMRegionClassificationNode.fromRegions([
46 VMRegion.fromDict({ 46 VMRegion.fromDict({
47 mappedFile: '/lib/chrome.so', 47 mappedFile: '/lib/chrome.so',
48 startAddress: 65536, 48 startAddress: 65536,
49 sizeInBytes: 536870912, 49 sizeInBytes: 536870912,
50 protectionFlags: VMRegion.PROTECTION_FLAG_READ | 50 protectionFlags: VMRegion.PROTECTION_FLAG_READ |
51 VMRegion.PROTECTION_FLAG_EXECUTE, 51 VMRegion.PROTECTION_FLAG_EXECUTE,
52 byteStats: { 52 byteStats: {
53 proportionalResident: 8192 53 proportionalResident: 8192
54 } 54 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 proportionalResident: 200, 104 proportionalResident: 200,
105 privateDirtyResident: 96, 105 privateDirtyResident: 96,
106 swapped: 0 106 swapped: 0
107 } 107 }
108 }) 108 })
109 ]); 109 ]);
110 110
111 // This is here so that we could test that tracing is discounted from the 111 // This is here so that we could test that tracing is discounted from the
112 // 'Native heap' category. 112 // 'Native heap' category.
113 pmd1.memoryAllocatorDumps = [ 113 pmd1.memoryAllocatorDumps = [
114 newAllocatorDump(pmd1, 'tracing', { size: 500, resident_size: 32 }) 114 newAllocatorDump(pmd1, 'tracing',
115 {numerics: {size: 500, resident_size: 32}})
115 ]; 116 ];
116 117
117 // Second timestamp. 118 // Second timestamp.
118 var gmd2 = addGlobalMemoryDump(model, 42, DETAILED); 119 var gmd2 = addGlobalMemoryDump(model, {ts: 42, levelOfDetail: DETAILED});
119 var pmd2 = addProcessMemoryDump(gmd2, process, 42); 120 var pmd2 = addProcessMemoryDump(gmd2, process, {ts: 42});
120 pmd2.vmRegions = VMRegionClassificationNode.fromRegions([ 121 pmd2.vmRegions = VMRegionClassificationNode.fromRegions([
121 VMRegion.fromDict({ 122 VMRegion.fromDict({
122 mappedFile: '/lib/chrome.so', 123 mappedFile: '/lib/chrome.so',
123 startAddress: 65536, 124 startAddress: 65536,
124 sizeInBytes: 536870912, 125 sizeInBytes: 536870912,
125 protectionFlags: VMRegion.PROTECTION_FLAG_READ | 126 protectionFlags: VMRegion.PROTECTION_FLAG_READ |
126 VMRegion.PROTECTION_FLAG_EXECUTE, 127 VMRegion.PROTECTION_FLAG_EXECUTE,
127 byteStats: { 128 byteStats: {
128 proportionalResident: 9216 129 proportionalResident: 9216
129 } 130 }
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 481
481 // Just check that the table has the right shape. 482 // Just check that the table has the right shape.
482 var table = viewEl.$.table; 483 var table = viewEl.$.table;
483 var columns = table.tableColumns; 484 var columns = table.tableColumns;
484 checkColumns(columns, EXPECTED_COLUMNS, AggregationMode.DIFF); 485 checkColumns(columns, EXPECTED_COLUMNS, AggregationMode.DIFF);
485 var rows = table.tableRows; 486 var rows = table.tableRows;
486 assert.lengthOf(rows, 1); 487 assert.lengthOf(rows, 1);
487 }); 488 });
488 }); 489 });
489 </script> 490 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/analysis/memory_dump_sub_view_test_utils.html ('k') | tracing/tracing/ui/analysis/power_sample_table.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698