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 WebInspector.inspectorView.showPanel("profiles"); | 9 WebInspector.inspectorView.showPanel("profiles"); |
10 | 10 |
11 var instanceCount = 50; | 11 var instanceCount = 50; |
12 function createHeapSnapshot() | 12 function createHeapSnapshot() |
13 { | 13 { |
14 return InspectorTest.createHeapSnapshot(instanceCount); | 14 return InspectorTest.createHeapSnapshot(instanceCount); |
15 } | 15 } |
16 | 16 |
17 InspectorTest.runHeapSnapshotTestSuite([ | 17 InspectorTest.runHeapSnapshotTestSuite([ |
18 function testShowAll(next) | 18 function testShowAll(next) |
19 { | 19 { |
20 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); | 20 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); |
21 | 21 |
22 function step1() | 22 function step1() |
23 { | 23 { |
24 InspectorTest.switchToView("Summary", step2); | 24 InspectorTest.switchToView("Summary", step2); |
25 } | 25 } |
26 | 26 |
27 function step2() | 27 function step2() |
28 { | 28 { |
29 var row = InspectorTest.findRow("object", "A"); | 29 var row = InspectorTest.findRow("A"); |
30 InspectorTest.assertEquals(true, !!row, "\"A\" row"); | 30 InspectorTest.assertEquals(true, !!row, "\"A\" row"); |
31 InspectorTest.expandRow(row, step3); | 31 InspectorTest.expandRow(row, step3); |
32 } | 32 } |
33 | 33 |
34 function checkShowMoreButton(showMoreButton, expectedStartPosition,
expectedEndPosition) | 34 function checkShowMoreButton(showMoreButton, expectedStartPosition,
expectedEndPosition) |
35 { | 35 { |
36 InspectorTest.assertEquals(true , showMoreButton instanceof WebI
nspector.ShowMoreDataGridNode, "Show more button node not found"); | 36 InspectorTest.assertEquals(true , showMoreButton instanceof WebI
nspector.ShowMoreDataGridNode, "Show more button node not found"); |
37 InspectorTest.assertEquals(expectedStartPosition , showMoreButto
n._startPosition, "Incorrect start position"); | 37 InspectorTest.assertEquals(expectedStartPosition , showMoreButto
n._startPosition, "Incorrect start position"); |
38 InspectorTest.assertEquals(expectedEndPosition , showMoreButton.
_endPosition, "Incorrect end position"); | 38 InspectorTest.assertEquals(expectedEndPosition , showMoreButton.
_endPosition, "Incorrect end position"); |
39 } | 39 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 113 } |
114 | 114 |
115 </script> | 115 </script> |
116 </head> | 116 </head> |
117 <body onload="runTest()"> | 117 <body onload="runTest()"> |
118 <p> | 118 <p> |
119 Tests showing several node ranges in the Summary view of detailed heap snapshot. | 119 Tests showing several node ranges in the Summary view of detailed heap snapshot. |
120 </p> | 120 </p> |
121 </body> | 121 </body> |
122 </html> | 122 </html> |
OLD | NEW |