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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-summary-sorting-fields.html

Issue 2444223002: [Devtools] Cleanup DataGrid's typecast and identifier naming (Closed)
Patch Set: changes Created 4 years, 1 month 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="heap-snapshot-test.js"></script> 4 <script src="heap-snapshot-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var instanceCount = 10; 9 var instanceCount = 10;
10 function createHeapSnapshot() 10 function createHeapSnapshot()
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 if (currentColumn >= columns.length) { 55 if (currentColumn >= columns.length) {
56 setTimeout(next, 0); 56 setTimeout(next, 0);
57 return; 57 return;
58 } 58 }
59 InspectorTest.clickColumn(columns[currentColumn], step4); 59 InspectorTest.clickColumn(columns[currentColumn], step4);
60 } 60 }
61 61
62 function step4(newColumnState) 62 function step4(newColumnState)
63 { 63 {
64 columns[currentColumn] = newColumnState; 64 columns[currentColumn] = newColumnState;
65 var columnName = columns[currentColumn].identifier; 65 var columnName = columns[currentColumn].id;
66 var contents = windowRow.children.map(function(obj) { return obj .element().children[currentColumn].textContent; }); 66 var contents = windowRow.children.map(function(obj) { return obj .element().children[currentColumn].textContent; });
67 InspectorTest.assertEquals(instanceCount, contents.length, "colu mn contents"); 67 InspectorTest.assertEquals(instanceCount, contents.length, "colu mn contents");
68 var sortTypes = { object: "text", distance: "number", count: "nu mber", shallowSize: "size", retainedSize: "size" }; 68 var sortTypes = { object: "text", distance: "number", count: "nu mber", shallowSize: "size", retainedSize: "size" };
69 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu mn].identifier], "sort by identifier"); 69 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu mn].id], "sort by id");
70 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur rentColumn].identifier], columns[currentColumn].sort); 70 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur rentColumn].id], columns[currentColumn].sort);
71 71
72 if (!currentColumnOrder) 72 if (!currentColumnOrder)
73 currentColumnOrder = true; 73 currentColumnOrder = true;
74 else { 74 else {
75 currentColumnOrder = false; 75 currentColumnOrder = false;
76 ++currentColumn; 76 ++currentColumn;
77 } 77 }
78 step3(); 78 step3();
79 } 79 }
80 } 80 }
81 ]); 81 ]);
82 } 82 }
83 83
84 </script> 84 </script>
85 </head> 85 </head>
86 <body onload="runTest()"> 86 <body onload="runTest()">
87 <p> 87 <p>
88 Tests sorting in Summary view of detailed heap snapshots. 88 Tests sorting in Summary view of detailed heap snapshots.
89 </p> 89 </p>
90 </body> 90 </body>
91 </html> 91 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698