Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / profiler / heap-snapshot-containment-sorting.html
blob856de4a57ebe1f50b23cfc4714cb40656032b0e6
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 = 25;
10 function createHeapSnapshot()
12 return InspectorTest.createHeapSnapshot(instanceCount);
15 InspectorTest.runHeapSnapshotTestSuite([
16 function testSorting(next)
18 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1);
20 function step1()
22 InspectorTest.switchToView("Containment", step2);
25 var gcRoots;
26 var columns;
27 var currentColumn;
28 var currentColumnOrder;
30 function step2()
32 InspectorTest.findAndExpandGCRoots(step3);
35 function step3(gcRootsRow)
37 gcRoots = gcRootsRow;
38 columns = InspectorTest.viewColumns();
39 currentColumn = 0;
40 currentColumnOrder = false;
41 setTimeout(step4, 0);
44 function step4()
46 if (currentColumn >= columns.length) {
47 setTimeout(next, 0);
48 return;
51 InspectorTest.clickColumn(columns[currentColumn], step5);
54 function step5(newColumnState)
56 columns[currentColumn] = newColumnState;
57 var contents = InspectorTest.columnContents(columns[currentColumn], gcRoots);
58 InspectorTest.assertEquals(true, !!contents.length, "column contents");
59 var sortTypes = { object: "name", distance: "number", shallowSize: "size", retainedSize: "size" };
60 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColumn].identifier], "sort by identifier");
61 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[currentColumn].identifier], columns[currentColumn].sort);
63 if (!currentColumnOrder)
64 currentColumnOrder = true;
65 else {
66 currentColumnOrder = false;
67 ++currentColumn;
69 setTimeout(step4, 0);
72 ]);
75 </script>
76 </head>
77 <body onload="runTest()">
78 <p>
79 Tests sorting in Containment view of detailed heap snapshots.
80 </p>
81 </body>
82 </html>