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 testExpansionPreservedWhenSorting(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("showAll", buttonsNode
, step5
);
46 var row
= row
.children
[0];
47 InspectorTest
.assertEquals(true, !!row
, "\"B\" instance row");
48 InspectorTest
.expandRow(row
, expandA
);
51 function propertyMatcher(data
)
53 return data
._referenceName
=== "a" && data
._name
.charAt(0) === "A";
55 var aRow
= InspectorTest
.findMatchingRow(propertyMatcher
, row
);
56 InspectorTest
.assertEquals(true, !!aRow
, "\"a: A\" row");
57 InspectorTest
.expandRow(aRow
, step6
);
64 columnContents
= InspectorTest
.columnContents(columns
[0]);
65 InspectorTest
.clickColumn(columns
[0], clickTwice
);
68 InspectorTest
.clickColumn(columns
[0], step7
);
74 var newColumnContents
= InspectorTest
.columnContents(columns
[0]);
75 InspectorTest
.assertColumnContentsEqual(columnContents
, newColumnContents
);
84 <body onload=
"runTest()">
86 Tests Containment view of detailed heap snapshots.
87 Expanded nodes must be preserved after sorting.