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 = 24; | 9 var instanceCount = 24; |
10 function createHeapSnapshotA() | 10 function createHeapSnapshotA() |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 function step4(newColumnState) | 54 function step4(newColumnState) |
55 { | 55 { |
56 columns[currentColumn] = newColumnState; | 56 columns[currentColumn] = newColumnState; |
57 var contents = InspectorTest.columnContents(columns[currentColum
n]); | 57 var contents = InspectorTest.columnContents(columns[currentColum
n]); |
58 InspectorTest.assertEquals(true, !!contents.length, "column cont
ents"); | 58 InspectorTest.assertEquals(true, !!contents.length, "column cont
ents"); |
59 var sortTypes = { object: "text", | 59 var sortTypes = { object: "text", |
60 addedCount: "number", removedCount: "number",
countDelta: "number", | 60 addedCount: "number", removedCount: "number",
countDelta: "number", |
61 addedSize: "size", removedSize: "size", sizeDe
lta: "size" }; | 61 addedSize: "size", removedSize: "size", sizeDe
lta: "size" }; |
62 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu
mn].identifier], "sort by identifier"); | 62 InspectorTest.assertEquals(true, !!sortTypes[columns[currentColu
mn].id], "sort by id"); |
63 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur
rentColumn].identifier], columns[currentColumn].sort); | 63 InspectorTest.checkArrayIsSorted(contents, sortTypes[columns[cur
rentColumn].id], columns[currentColumn].sort); |
64 | 64 |
65 if (!currentColumnOrder) | 65 if (!currentColumnOrder) |
66 currentColumnOrder = true; | 66 currentColumnOrder = true; |
67 else { | 67 else { |
68 currentColumnOrder = false; | 68 currentColumnOrder = false; |
69 ++currentColumn; | 69 ++currentColumn; |
70 } | 70 } |
71 setTimeout(step3, 0); | 71 setTimeout(step3, 0); |
72 } | 72 } |
73 } | 73 } |
74 ]); | 74 ]); |
75 } | 75 } |
76 | 76 |
77 </script> | 77 </script> |
78 </head> | 78 </head> |
79 <body onload="runTest()"> | 79 <body onload="runTest()"> |
80 <p> | 80 <p> |
81 Tests sorting in Comparison view of detailed heap snapshots. | 81 Tests sorting in Comparison view of detailed heap snapshots. |
82 </p> | 82 </p> |
83 </body> | 83 </body> |
84 </html> | 84 </html> |
OLD | NEW |