Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / profiler / heap-snapshot-comparison-shown-node-count-preserved-when-sorting.html
blob1bda5ebe2545823309303ce297d50e1d48abcb4a
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="heap-snapshot-test.js"></script>
5 <script>
7 function test()
9 var instanceCount = 24;
10 function createHeapSnapshotA()
12 return InspectorTest.createHeapSnapshot(instanceCount, 5);
14 function createHeapSnapshotB()
16 return InspectorTest.createHeapSnapshot(instanceCount + 1, 5 + instanceCount);
19 InspectorTest.runHeapSnapshotTestSuite([
20 function testExpansionPreservedWhenSorting(next)
22 InspectorTest.takeAndOpenSnapshot(createHeapSnapshotA, createSnapshotB);
23 function createSnapshotB() {
24 InspectorTest.takeAndOpenSnapshot(createHeapSnapshotB, step1);
27 function step1()
29 InspectorTest.switchToView("Comparison", step2);
32 var columns;
33 function step2()
35 columns = InspectorTest.viewColumns();
36 InspectorTest.clickColumn(columns[0], step3);
39 function step3()
41 var row = InspectorTest.findRow("B");
42 InspectorTest.assertEquals(true, !!row, "\"B\" row");
43 InspectorTest.expandRow(row, showNext);
44 function showNext(row)
46 var buttonsNode = InspectorTest.findButtonsNode(row);
47 InspectorTest.assertEquals(true, !!buttonsNode, "no buttons node found!");
48 InspectorTest.clickShowMoreButton("showAll", buttonsNode, step4);
52 function step4()
54 var row = InspectorTest.findRow("B");
55 InspectorTest.assertEquals(true, !!row, "\"B\" row");
56 function deletedNodeMatcher(data)
58 return data._isDeletedNode && data._name.charAt(0) === "B";
60 var bInstanceRow = InspectorTest.findMatchingRow(deletedNodeMatcher, row);
61 InspectorTest.assertEquals(true, !!bInstanceRow, "\"B\" instance row");
62 var buttonsNode = InspectorTest.findButtonsNode(row, bInstanceRow);
63 InspectorTest.assertEquals(false, !!buttonsNode, "buttons node found!");
64 step5();
67 var nodeCount;
68 function step5()
70 nodeCount = InspectorTest.columnContents(columns[0]).length;
71 InspectorTest.assertEquals(true, nodeCount > 0, "nodeCount > 0");
73 InspectorTest.clickColumn(columns[0], clickTwice);
74 function clickTwice()
76 InspectorTest.clickColumn(columns[0], step6);
80 function step6()
82 var newNodeCount = InspectorTest.columnContents(columns[0]).length;
83 InspectorTest.assertEquals(nodeCount, newNodeCount);
84 setTimeout(next, 0);
87 ]);
90 </script>
91 </head>
92 <body onload="runTest()">
93 <p>
94 Tests Comparison view of detailed heap snapshots.
95 Shown node count must be preserved after sorting.
96 </p>
97 </body>
98 </html>