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 testShowNext(next
)
18 InspectorTest
.takeAndOpenSnapshot(createHeapSnapshot
, step1
);
22 InspectorTest
.switchToView("Containment", step2
);
27 InspectorTest
.findAndExpandWindow(step3
);
32 var rowsShown
= InspectorTest
.countDataRows(row
);
33 InspectorTest
.assertEquals(true, rowsShown
<= instanceCount
, "shown more instances than created: " + rowsShown
+ " > " + instanceCount
);
34 if (rowsShown
< instanceCount
) {
35 var buttonsNode
= InspectorTest
.findButtonsNode(row
);
36 InspectorTest
.assertEquals(true, !!buttonsNode
, "buttons node");
37 InspectorTest
.clickShowMoreButton("showNext", buttonsNode
, step3
);
38 } else if (rowsShown
=== instanceCount
) {
39 var buttonsNode
= InspectorTest
.findButtonsNode(row
);
40 InspectorTest
.assertEquals(false, !!buttonsNode
, "buttons node found when all instances are shown!");
50 <body onload=
"runTest()">
52 Tests Containment view of detailed heap snapshots.
53 Repeated clicks on
"Show Next
" button must show all nodes.