| 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() |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Mocking results of running the following code: | 57 // Mocking results of running the following code: |
| 58 // | 58 // |
| 59 // function Tail() {} | 59 // function Tail() {} |
| 60 // next = new Tail(); | 60 // next = new Tail(); |
| 61 // for (var i = 0; i < 5; ++i) | 61 // for (var i = 0; i < 5; ++i) |
| 62 // next = { next: next }; | 62 // next = { next: next }; |
| 63 | 63 |
| 64 var builder = new InspectorTest.HeapSnapshotBuilder(); | 64 var builder = new InspectorTest.HeapSnapshotBuilder(); |
| 65 var rootNode = builder.rootNode; | 65 var rootNode = builder.rootNode; |
| 66 | 66 |
| 67 var gcRootsNode = new InspectorTest.HeapNode("(GC roots)"); | 67 var gcRootsNode = new InspectorTest.HeapNode("(GC roots)", 0, In
spectorTest.HeapNode.Type.synthetic); |
| 68 rootNode.linkNode(gcRootsNode, InspectorTest.HeapEdge.Type.eleme
nt); | 68 rootNode.linkNode(gcRootsNode, InspectorTest.HeapEdge.Type.eleme
nt); |
| 69 | 69 |
| 70 var globalHandlesNode = new InspectorTest.HeapNode("(Global Hand
les)"); | 70 var globalHandlesNode = new InspectorTest.HeapNode("(Global Hand
les)"); |
| 71 gcRootsNode.linkNode(globalHandlesNode, InspectorTest.HeapEdge.T
ype.element); | 71 gcRootsNode.linkNode(globalHandlesNode, InspectorTest.HeapEdge.T
ype.element); |
| 72 | 72 |
| 73 var nativeContextNode = new InspectorTest.HeapNode("system / Nat
iveContext", 32); | 73 var nativeContextNode = new InspectorTest.HeapNode("system / Nat
iveContext", 32); |
| 74 globalHandlesNode.linkNode(nativeContextNode, InspectorTest.Heap
Edge.Type.element); | 74 globalHandlesNode.linkNode(nativeContextNode, InspectorTest.Heap
Edge.Type.element); |
| 75 | 75 |
| 76 var windowNode = new InspectorTest.HeapNode("Window", 20); | 76 var windowNode = new InspectorTest.HeapNode("Window", 20); |
| 77 rootNode.linkNode(windowNode, InspectorTest.HeapEdge.Type.shortc
ut); | 77 rootNode.linkNode(windowNode, InspectorTest.HeapEdge.Type.shortc
ut); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 </script> | 143 </script> |
| 144 </head> | 144 </head> |
| 145 <body onload="runTest()"> | 145 <body onload="runTest()"> |
| 146 <p> | 146 <p> |
| 147 Tests Containment view of detailed heap snapshots. | 147 Tests Containment view of detailed heap snapshots. |
| 148 The "Show All" button must show all nodes. | 148 The "Show All" button must show all nodes. |
| 149 Test object distances calculation. | 149 Test object distances calculation. |
| 150 </p> | 150 </p> |
| 151 </body> | 151 </body> |
| 152 </html> | 152 </html> |
| OLD | NEW |