OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="heap-snapshot-test.js"></script> | 4 <script src="heap-snapshot-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function test() | 7 function test() |
8 { | 8 { |
9 var instanceCount = 25; | 9 var instanceCount = 25; |
10 function createHeapSnapshot() | 10 function createHeapSnapshot() |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 InspectorTest.clickColumn(columns[currentColumn], step4); | 44 InspectorTest.clickColumn(columns[currentColumn], step4); |
45 } | 45 } |
46 | 46 |
47 function step4(newColumnState) | 47 function step4(newColumnState) |
48 { | 48 { |
49 columns[currentColumn] = newColumnState; | 49 columns[currentColumn] = newColumnState; |
50 var contents = InspectorTest.columnContents(columns[currentColum
n]); | 50 var contents = InspectorTest.columnContents(columns[currentColum
n]); |
51 InspectorTest.assertEquals(true, !!contents.length, "column cont
ents"); | 51 InspectorTest.assertEquals(true, !!contents.length, "column cont
ents"); |
52 var sortTypes = { object: "text", distance: "number", count: "nu
mber", shallowSize: "size", retainedSize: "size" }; | 52 var sortTypes = { object: "text", distance: "number", count: "nu
mber", shallowSize: "size", retainedSize: "size" }; |
53 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu
mn].identifier], "sort by identifier"); | 53 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu
mn].id], "sort by id"); |
54 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur
rentColumn].identifier], columns[currentColumn].sort); | 54 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur
rentColumn].id], columns[currentColumn].sort); |
55 | 55 |
56 if (!currentColumnOrder) | 56 if (!currentColumnOrder) |
57 currentColumnOrder = true; | 57 currentColumnOrder = true; |
58 else { | 58 else { |
59 currentColumnOrder = false; | 59 currentColumnOrder = false; |
60 ++currentColumn; | 60 ++currentColumn; |
61 } | 61 } |
62 setTimeout(step3, 0); | 62 setTimeout(step3, 0); |
63 } | 63 } |
64 } | 64 } |
65 ]); | 65 ]); |
66 } | 66 } |
67 | 67 |
68 </script> | 68 </script> |
69 </head> | 69 </head> |
70 <body onload="runTest()"> | 70 <body onload="runTest()"> |
71 <p> | 71 <p> |
72 Tests sorting in Summary view of detailed heap snapshots. | 72 Tests sorting in Summary view of detailed heap snapshots. |
73 </p> | 73 </p> |
74 </body> | 74 </body> |
75 </html> | 75 </html> |
OLD | NEW |