3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="heap-snapshot-test.js"></script>
10 var instanceCount = 50;
11 function createHeapSnapshot()
13 return InspectorTest.createHeapSnapshot(instanceCount);
16 InspectorTest.runHeapSnapshotTestSuite([
17 function testShowAll(next)
19 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1);
22 function dumpAndPopulate(step, from, to, callback)
24 InspectorTest.addResult("");
25 InspectorTest.addResult(step);
26 InspectorTest.addResult("Retrieved ranges: " + JSON.stringify(row._retrievedChildrenRanges));
27 for (var i = 0; i < row.children.length; ++i)
28 InspectorTest.addResult("[" + i + "] " + row.children[i]._element.textContent.replace(/[^\w\d]/mg, " "));
30 row._populateChildren(from, to, callback);
35 InspectorTest.switchToView("Summary", step2);
40 row = InspectorTest.findRow("A");
41 InspectorTest.addResult("Row found: " + !!row);
42 InspectorTest.expandRow(row, step3);
47 dumpAndPopulate("Step 3", 30, 40, step4);
52 dumpAndPopulate("Step 4", 20, 25, step5);
57 dumpAndPopulate("Step 5", 28, 35, step6);
62 dumpAndPopulate("Step 6", 18, 26, step7);
67 dumpAndPopulate("Step 7", 15, 45, step8);
72 dumpAndPopulate("Step 8", 10, 15, step9);
77 dumpAndPopulate("Step 9");
86 <body onload="runTest()">
88 Tests showing several node ranges in the Summary view of detailed heap snapshot.