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() |
11 { | 11 { |
12 return InspectorTest.createHeapSnapshot(instanceCount); | 12 return InspectorTest.createHeapSnapshot(instanceCount); |
13 } | 13 } |
14 | 14 |
15 InspectorTest.runHeapSnapshotTestSuite([ | 15 InspectorTest.runHeapSnapshotTestSuite([ |
16 function testShowAll(next) | 16 function testShowAll(next) |
17 { | 17 { |
18 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); | 18 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); |
19 | 19 |
20 function step1() | 20 function step1() |
21 { | 21 { |
22 InspectorTest.switchToView("Summary", step2); | 22 InspectorTest.switchToView("Summary", step2); |
23 } | 23 } |
24 | 24 |
25 function step2() | 25 function step2() |
26 { | 26 { |
27 var row = InspectorTest.findRow("object", "A"); | 27 var row = InspectorTest.findRow("A"); |
28 InspectorTest.assertEquals(true, !!row, "\"A\" row"); | 28 InspectorTest.assertEquals(true, !!row, "\"A\" row"); |
29 InspectorTest.expandRow(row, step3); | 29 InspectorTest.expandRow(row, step3); |
30 } | 30 } |
31 | 31 |
32 function step3(row) | 32 function step3(row) |
33 { | 33 { |
34 var count = row.data["count"]; | 34 var count = row.data["count"]; |
35 InspectorTest.assertEquals(instanceCount.toString(), count); | 35 InspectorTest.assertEquals(instanceCount.toString(), count); |
36 var buttonsNode = InspectorTest.findButtonsNode(row); | 36 var buttonsNode = InspectorTest.findButtonsNode(row); |
37 InspectorTest.assertEquals(true, !!buttonsNode, "buttons node"); | 37 InspectorTest.assertEquals(true, !!buttonsNode, "buttons node"); |
(...skipping 20 matching lines...) Expand all Loading... |
58 | 58 |
59 </script> | 59 </script> |
60 </head> | 60 </head> |
61 <body onload="runTest()"> | 61 <body onload="runTest()"> |
62 <p> | 62 <p> |
63 Tests Summary view of detailed heap snapshots. | 63 Tests Summary view of detailed heap snapshots. |
64 The "Show All" button must show all nodes. | 64 The "Show All" button must show all nodes. |
65 </p> | 65 </p> |
66 </body> | 66 </body> |
67 </html> | 67 </html> |
OLD | NEW |