Diff
Modified: trunk/LayoutTests/ChangeLog (118792 => 118793)
--- trunk/LayoutTests/ChangeLog 2012-05-29 16:31:58 UTC (rev 118792)
+++ trunk/LayoutTests/ChangeLog 2012-05-29 16:36:08 UTC (rev 118793)
@@ -1,3 +1,16 @@
+2012-05-29 Alexei Filippov <[email protected]>
+
+ Web Inspector: Retainers are missing for all objects
+ https://bugs.webkit.org/show_bug.cgi?id=87655
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/profiler/heap-snapshot-summary-retainers-expected.txt: Added.
+ * inspector/profiler/heap-snapshot-summary-retainers.html: Added.
+ * inspector/profiler/heap-snapshot-test.js:
+ (initialize_HeapSnapshotTest.):
+ (initialize_HeapSnapshotTest):
+
2012-05-29 Simon Pena <[email protected]>
[GTK] fast tests needs rebaseline after r118733
Added: trunk/LayoutTests/inspector/profiler/heap-snapshot-summary-retainers-expected.txt (0 => 118793)
--- trunk/LayoutTests/inspector/profiler/heap-snapshot-summary-retainers-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot-summary-retainers-expected.txt 2012-05-29 16:36:08 UTC (rev 118793)
@@ -0,0 +1,9 @@
+Tests retainers view. Number of retainers of an A object must be 2 (A itself and B).
+
+Profiler was enabled.
+Detailed heap profiles were enabled.
+
+Running: testRetainersView
+
+Profiler was disabled.
+
Added: trunk/LayoutTests/inspector/profiler/heap-snapshot-summary-retainers.html (0 => 118793)
--- trunk/LayoutTests/inspector/profiler/heap-snapshot-summary-retainers.html (rev 0)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot-summary-retainers.html 2012-05-29 16:36:08 UTC (rev 118793)
@@ -0,0 +1,57 @@
+<html>
+<head>
+ <script src=""
+ <script src=""
+<script>
+
+function test()
+{
+ var instanceCount = 25;
+ function createHeapSnapshot()
+ {
+ return InspectorTest.createHeapSnapshot(instanceCount);
+ }
+
+ InspectorTest.runHeapSnapshotTestSuite([
+ function testRetainersView(next)
+ {
+ InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1);
+
+ function step1()
+ {
+ InspectorTest.switchToView("Summary", step2);
+ }
+
+ function step2()
+ {
+ var row = InspectorTest.findRow("object", "A");
+ InspectorTest.assertEquals(true, !!row, "\"A\" row");
+ InspectorTest.expandRow(row, step3);
+ }
+
+ function step3(row)
+ {
+ var count = row.data["count"];
+ InspectorTest.assertEquals(instanceCount.toString(), count);
+ InspectorTest.clickRowAndGetRetainers(row.children[0], step4);
+ }
+
+ function step4(retainersRoot)
+ {
+ var rowsShown = InspectorTest.countDataRows(retainersRoot);
+ InspectorTest.assertEquals(2, rowsShown, "retaining objects");
+ setTimeout(next, 0);
+ }
+ }
+ ]);
+}
+
+</script>
+</head>
+<body _onload_="runTest()">
+<p>
+Tests retainers view.
+Number of retainers of an A object must be 2 (A itself and B).
+</p>
+</body>
+</html>
Modified: trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js (118792 => 118793)
--- trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js 2012-05-29 16:31:58 UTC (rev 118792)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js 2012-05-29 16:36:08 UTC (rev 118793)
@@ -338,6 +338,25 @@
this._currentGrid()._clickInHeaderCell(event);
};
+InspectorTest.clickRowAndGetRetainers = function(row, callback)
+{
+ callback = InspectorTest.safeWrap(callback);
+ var event = {
+ target: {
+ enclosingNodeOrSelfWithNodeName: function() { return row._element; },
+ selectedNode: row
+ }
+ };
+ this._currentGrid()._mouseDownInDataTable(event);
+ var rootNode = InspectorTest._currentGrid().snapshotView.retainmentDataGrid.rootNode();
+ function populateComplete()
+ {
+ rootNode.removeEventListener("populate complete", populateComplete, this);
+ callback(rootNode);
+ }
+ rootNode.addEventListener("populate complete", populateComplete, this);
+};
+
InspectorTest.clickShowMoreButton = function(buttonName, row, callback)
{
callback = InspectorTest.safeWrap(callback);
Modified: trunk/Source/WebCore/ChangeLog (118792 => 118793)
--- trunk/Source/WebCore/ChangeLog 2012-05-29 16:31:58 UTC (rev 118792)
+++ trunk/Source/WebCore/ChangeLog 2012-05-29 16:36:08 UTC (rev 118793)
@@ -1,3 +1,13 @@
+2012-05-29 Alexei Filippov <[email protected]>
+
+ Web Inspector: Retainers are missing for all objects
+ https://bugs.webkit.org/show_bug.cgi?id=87655
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/front-end/HeapSnapshotDataGrids.js:
+ (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
+
2012-05-29 Philippe Normand <[email protected]>
[GStreamer] Video sink doesn't respect WebKit code style
Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js (118792 => 118793)
--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js 2012-05-29 16:31:58 UTC (rev 118792)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js 2012-05-29 16:36:08 UTC (rev 118793)
@@ -438,7 +438,8 @@
{
this.snapshotView = snapshotView;
this.snapshot = snapshot;
- var fakeEdge = { nodeIndex: nodeIndex || this.snapshot.rootNodeIndex };
+ var node = new WebInspector.HeapSnapshotNode(snapshot, nodeIndex || snapshot.rootNodeIndex);
+ var fakeEdge = { node: node };
this.setRootNode(new WebInspector.HeapSnapshotObjectNode(this, false, fakeEdge, null));
this.rootNode().sort();
},