3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"heap-snapshot-test.js"></script>
9 var instanceCount
= 25;
10 function createHeapSnapshot()
12 return InspectorTest
.createHeapSnapshot(instanceCount
);
15 InspectorTest
.runHeapSnapshotTestSuite([
16 function testShownNodeCountPreservedWhenSorting(next
)
18 InspectorTest
.takeAndOpenSnapshot(createHeapSnapshot
, step1
);
22 InspectorTest
.switchToView("Containment", step2
);
28 columns
= InspectorTest
.viewColumns();
29 InspectorTest
.clickColumn(columns
[0], step3
);
34 InspectorTest
.findAndExpandWindow(step4
);
39 var buttonsNode
= InspectorTest
.findButtonsNode(row
);
40 InspectorTest
.assertEquals(true, !!buttonsNode
, "no buttons node found!");
41 InspectorTest
.clickShowMoreButton("showNext", buttonsNode
, step5
);
47 // There must be enough nodes to have some unrevealed.
48 var buttonsNode
= InspectorTest
.findButtonsNode(row
);
49 InspectorTest
.assertEquals(true, !!buttonsNode
, "no buttons node found!");
51 nodeCount
= InspectorTest
.columnContents(columns
[0]).length
;
52 InspectorTest
.assertEquals(true, nodeCount
> 0, "nodeCount > 0");
54 InspectorTest
.clickColumn(columns
[0], clickTwice
);
57 InspectorTest
.clickColumn(columns
[0], step6
);
63 var newNodeCount
= InspectorTest
.columnContents(columns
[0]).length
;
64 InspectorTest
.assertEquals(nodeCount
, newNodeCount
);
73 <body onload=
"runTest()">
75 Tests Containment view of detailed heap snapshots.
76 Shown node count must be preserved after sorting.