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

Side by Side Diff: LayoutTests/inspector/profiler/heap-snapshot-dominators-sorting.html

Issue 352603003: DevTools: Nuke Dominators view from heap profiler. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="heap-snapshot-test.js"></script>
5 <script>
6
7 function test()
8 {
9 var instanceCount = 25;
10 function createHeapSnapshot()
11 {
12 return InspectorTest.createHeapSnapshot(instanceCount);
13 }
14
15 InspectorTest.runHeapSnapshotTestSuite([
16 function testSorting(next)
17 {
18 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1);
19
20 function step1()
21 {
22 InspectorTest.switchToView("Dominators", step2);
23 }
24
25 var gcRoots;
26 var columns;
27 var currentColumn;
28 var currentColumnOrder;
29
30 function step2()
31 {
32 InspectorTest.findAndExpandWindow(step3);
33 }
34
35 function step3(gcRootsRow)
36 {
37 gcRoots = gcRootsRow;
38 columns = InspectorTest.viewColumns();
39 currentColumn = 0;
40 currentColumnOrder = false;
41 setTimeout(step4, 0);
42 }
43
44 function step4()
45 {
46 if (currentColumn >= columns.length) {
47 setTimeout(next, 0);
48 return;
49 }
50
51 InspectorTest.clickColumn(columns[currentColumn], step5);
52 }
53
54 function step5(newColumnState)
55 {
56 columns[currentColumn] = newColumnState;
57 var contents = InspectorTest.columnContents(columns[currentColum n], gcRoots);
58 InspectorTest.assertEquals(true, !!contents.length, "column cont ents");
59 var sortTypes = { object: "id", shallowSize: "size", retainedSiz e: "size" };
60 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu mn].identifier], "sort by identifier");
61 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur rentColumn].identifier], columns[currentColumn].sort);
62
63 if (!currentColumnOrder)
64 currentColumnOrder = true;
65 else {
66 currentColumnOrder = false;
67 ++currentColumn;
68 }
69 setTimeout(step4, 0);
70 }
71 }
72 ]);
73 }
74
75 </script>
76 </head>
77 <body onload="runTest()">
78 <p>
79 Tests sorting in Dominators view of detailed heap snapshots.
80 </p>
81 </body>
82 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698