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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 InspectorTest.clickColumn(columns[currentColumn], step5); | 51 InspectorTest.clickColumn(columns[currentColumn], step5); |
52 } | 52 } |
53 | 53 |
54 function step5(newColumnState) | 54 function step5(newColumnState) |
55 { | 55 { |
56 columns[currentColumn] = newColumnState; | 56 columns[currentColumn] = newColumnState; |
57 var contents = InspectorTest.columnContents(columns[currentColum
n], gcRoots); | 57 var contents = InspectorTest.columnContents(columns[currentColum
n], gcRoots); |
58 InspectorTest.assertEquals(true, !!contents.length, "column cont
ents"); | 58 InspectorTest.assertEquals(true, !!contents.length, "column cont
ents"); |
59 var sortTypes = { object: "name", distance: "number", shallowSiz
e: "size", retainedSize: "size" }; | 59 var sortTypes = { object: "name", distance: "number", shallowSiz
e: "size", retainedSize: "size" }; |
60 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu
mn].identifier], "sort by identifier"); | 60 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu
mn].id], "sort by id"); |
61 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur
rentColumn].identifier], columns[currentColumn].sort); | 61 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur
rentColumn].id], columns[currentColumn].sort); |
62 | 62 |
63 if (!currentColumnOrder) | 63 if (!currentColumnOrder) |
64 currentColumnOrder = true; | 64 currentColumnOrder = true; |
65 else { | 65 else { |
66 currentColumnOrder = false; | 66 currentColumnOrder = false; |
67 ++currentColumn; | 67 ++currentColumn; |
68 } | 68 } |
69 setTimeout(step4, 0); | 69 setTimeout(step4, 0); |
70 } | 70 } |
71 } | 71 } |
72 ]); | 72 ]); |
73 } | 73 } |
74 | 74 |
75 </script> | 75 </script> |
76 </head> | 76 </head> |
77 <body onload="runTest()"> | 77 <body onload="runTest()"> |
78 <p> | 78 <p> |
79 Tests sorting in Containment view of detailed heap snapshots. | 79 Tests sorting in Containment view of detailed heap snapshots. |
80 </p> | 80 </p> |
81 </body> | 81 </body> |
82 </html> | 82 </html> |
OLD | NEW |