| 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 var nodeAHeapSnapshotObjectId = 5 + 2*15 ; // Id of the 16th A node. | 19 var nodeAHeapSnapshotObjectId = 5 + 2*15 ; // Id of the 16th A node. |
| 20 | 20 |
| 21 function step1() | 21 function step1() |
| 22 { | 22 { |
| 23 InspectorTest.addSniffer(WebInspector.HeapSnapshotDominatorsData
Grid.prototype, "highlightNode", didHighlightNode); | 23 InspectorTest.addSniffer(WebInspector.HeapSnapshotDominatorsData
Grid.prototype, "highlightNode", didHighlightNode); |
| 24 WebInspector.panels.profiles.showObject(nodeAHeapSnapshotObjectI
d, "Dominators"); | 24 WebInspector.inspectorView.panel("profiles").showObject(nodeAHea
pSnapshotObjectId, "Dominators"); |
| 25 InspectorTest.addResult("Revealing node..."); | 25 InspectorTest.addResult("Revealing node..."); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function didHighlightNode(node) | 28 function didHighlightNode(node) |
| 29 { | 29 { |
| 30 InspectorTest.assertEquals(nodeAHeapSnapshotObjectId, node.snaps
hotNodeId, "Unxpected node highlighted."); | 30 InspectorTest.assertEquals(nodeAHeapSnapshotObjectId, node.snaps
hotNodeId, "Unxpected node highlighted."); |
| 31 InspectorTest.addResult("Node revealed."); | 31 InspectorTest.addResult("Node revealed."); |
| 32 next(); | 32 next(); |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 ]); | 35 ]); |
| 36 } | 36 } |
| 37 | 37 |
| 38 </script> | 38 </script> |
| 39 </head> | 39 </head> |
| 40 <body onload="runTest()"> | 40 <body onload="runTest()"> |
| 41 <p> | 41 <p> |
| 42 Tests that an object can be revealed in the Dominators view of detailed heap sna
pshots. | 42 Tests that an object can be revealed in the Dominators view of detailed heap sna
pshots. |
| 43 </p> | 43 </p> |
| 44 </body> | 44 </body> |
| 45 </html> | 45 </html> |
| OLD | NEW |