| 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 InspectorTest.runHeapSnapshotTestSuite([ | 9 InspectorTest.runHeapSnapshotTestSuite([ |
| 10 function testWeakReferencesDoNotAffectRetainedSize(next) | 10 function testWeakReferencesDoNotAffectRetainedSize(next) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // Shortcut links should not affect retained sizes. | 38 // Shortcut links should not affect retained sizes. |
| 39 rootNode.linkNode(windowNode, InspectorTest.HeapEdge.Type.shortc
ut, "w"); | 39 rootNode.linkNode(windowNode, InspectorTest.HeapEdge.Type.shortc
ut, "w"); |
| 40 rootNode.linkNode(aNode, InspectorTest.HeapEdge.Type.shortcut, "
a"); | 40 rootNode.linkNode(aNode, InspectorTest.HeapEdge.Type.shortcut, "
a"); |
| 41 rootNode.linkNode(bNode, InspectorTest.HeapEdge.Type.shortcut, "
b"); | 41 rootNode.linkNode(bNode, InspectorTest.HeapEdge.Type.shortcut, "
b"); |
| 42 rootNode.linkNode(orphanNode, InspectorTest.HeapEdge.Type.shortc
ut, "o"); | 42 rootNode.linkNode(orphanNode, InspectorTest.HeapEdge.Type.shortc
ut, "o"); |
| 43 | 43 |
| 44 return builder.generateSnapshot(); | 44 return builder.generateSnapshot(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 InspectorTest.addSniffer(WebInspector.HeapSnapshotView.prototype, "_
gotStatistics", checkStatistics, true); | 47 InspectorTest.addSniffer(Profiler.HeapSnapshotView.prototype, "_gotS
tatistics", checkStatistics, true); |
| 48 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); | 48 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); |
| 49 | 49 |
| 50 function checkStatistics(statistics) | 50 function checkStatistics(statistics) |
| 51 { | 51 { |
| 52 InspectorTest.assertEquals(4610, statistics.total); | 52 InspectorTest.assertEquals(4610, statistics.total); |
| 53 InspectorTest.assertEquals(4610, statistics.v8heap); | 53 InspectorTest.assertEquals(4610, statistics.v8heap); |
| 54 InspectorTest.addResult("SUCCESS: total size is correct."); | 54 InspectorTest.addResult("SUCCESS: total size is correct."); |
| 55 } | 55 } |
| 56 | 56 |
| 57 function step1() | 57 function step1() |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 </script> | 97 </script> |
| 98 </head> | 98 </head> |
| 99 <body onload="runTest()"> | 99 <body onload="runTest()"> |
| 100 <pre> | 100 <pre> |
| 101 Tests that weak references are ignored when dominators are calculated and that w
eak references won't affect object's retained size. | 101 Tests that weak references are ignored when dominators are calculated and that w
eak references won't affect object's retained size. |
| 102 </pre> | 102 </pre> |
| 103 </body> | 103 </body> |
| 104 </html> | 104 </html> |
| OLD | NEW |