Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: LayoutTests/inspector/profiler/heap-snapshot.html

Issue 207523004: Always use global indexes for nodes and edges in the heap snapshot representation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/profiler/heap-snapshot-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/profiler/heap-snapshot.html
diff --git a/LayoutTests/inspector/profiler/heap-snapshot.html b/LayoutTests/inspector/profiler/heap-snapshot.html
index 5ac0e8e17a21496488968258b57a8f484857d605..7316b85c139dd6c2aef9678367d39131a7dee180 100644
--- a/LayoutTests/inspector/profiler/heap-snapshot.html
+++ b/LayoutTests/inspector/profiler/heap-snapshot.html
@@ -58,12 +58,17 @@ function test()
{
var snapshot = InspectorTest.createJSHeapSnapshotMockObject();
var nodeRoot = snapshot.createNode(snapshot._rootNodeIndex);
- var edgesRoot = nodeRoot.rawEdges();
- InspectorTest.assertEquals(nodeRoot.edgesCount() * snapshot._edgeFieldsCount, edgesRoot.length, "rawEdges length");
- var edge = snapshot.createEdge(edgesRoot);
+ var edgeIterator = new WebInspector.HeapSnapshotEdgeIterator(nodeRoot);
+ InspectorTest.assertEquals(true, edgeIterator.hasNext(), "has edges");
+ var edge = edgeIterator.item();
InspectorTest.assertEquals("shortcut", edge.type(), "edge type");
InspectorTest.assertEquals("a", edge.name(), "edge name");
InspectorTest.assertEquals("A", edge.node().name(), "edge node name");
+
+ var edgesCount = 0;
+ for (; edgeIterator.hasNext(); edgeIterator.next())
+ ++edgesCount;
+ InspectorTest.assertEquals(nodeRoot.edgesCount(), edgesCount, "edges count");
},
function heapSnapshotEdgeIteratorTest()
@@ -292,19 +297,6 @@ function test()
}
},
- function heapSnapshotArraySliceTest()
- {
- var snapshot = new WebInspector.JSHeapSnapshot(InspectorTest.createHeapSnapshotMock(), new WebInspector.HeapSnapshotProgress());
- var root = snapshot.rootNode();
- var rawEdges = root.rawEdges();
- InspectorTest.assertEquals(6, rawEdges.length);
- InspectorTest.assertEquals(6, rawEdges.subarray(0).length);
- InspectorTest.assertEquals(3, rawEdges.subarray(3).length);
- InspectorTest.assertEquals(3, rawEdges.subarray(3, 6).length);
- InspectorTest.assertEquals(3, rawEdges.subarray(0, 3).length);
- InspectorTest.assertEquals(0, rawEdges.subarray(3, 3).length);
- },
-
function heapSnapshotNodesProviderTest()
{
var snapshot = new WebInspector.JSHeapSnapshot(InspectorTest.createHeapSnapshotMock(), new WebInspector.HeapSnapshotProgress());
« no previous file with comments | « no previous file | LayoutTests/inspector/profiler/heap-snapshot-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698