RESOLVED FIXED 108322
Web Inspector: test that references from DOM nodes to event listeners are presented in heap snapshots
https://bugs.webkit.org/show_bug.cgi?id=108322
Summary Web Inspector: test that references from DOM nodes to event listeners are pre...
Yury Semikhatsky
Reported 2013-01-30 03:36:25 PST
The links are external to the JS heap and reported using a special mechanism. We should have a test that would check presence of the references in JS heap snapshots.
Attachments
Patch (11.70 KB, patch)
2013-01-30 03:38 PST, Yury Semikhatsky
no flags
Patch (11.61 KB, patch)
2013-01-30 03:41 PST, Yury Semikhatsky
no flags
Patch (4.66 KB, patch)
2013-01-30 06:15 PST, Yury Semikhatsky
vsevik: review+
webkit.review.bot: commit-queue-
Yury Semikhatsky
Comment 1 2013-01-30 03:38:04 PST
Yury Semikhatsky
Comment 2 2013-01-30 03:39:31 PST
(In reply to comment #1) > Created an attachment (id=185460) [details] > Patch This patch depends on V8 change https://code.google.com/p/v8/source/detail?r=13486 which is not rolled yet.
Yury Semikhatsky
Comment 3 2013-01-30 03:41:50 PST
Ilya Tikhonovsky
Comment 4 2013-01-30 03:44:21 PST
Comment on attachment 185460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185460&action=review > LayoutTests/inspector-protocol/heap-snapshot-with-event-listener.html:64 > + if (!window.WebInspector) > + window.WebInspector = {}; > + InspectorTest.importScript("../../../../../Source/WebCore/inspector/front-end/HeapSnapshot.js"); > + InspectorTest.importScript("../../../../../Source/WebCore/inspector/front-end/JSHeapSnapshot.js"); > + > + InspectorTest.eventHandler["Profiler.addProfileHeader"] = function(messageObject) > + { > + var profileId = messageObject["params"]["header"]["uid"]; > + InspectorTest.sendCommand("Profiler.getHeapSnapshot", { "uid": profileId }, didGetHeapSnapshot); > + > + function didGetHeapSnapshot(messageObject) > + { > + InspectorTest.log("SUCCESS: didGetHeapSnapshot"); > + InspectorTest.completeTest(); > + } > + } > + > + var chunks = []; > + InspectorTest.eventHandler["Profiler.addHeapSnapshotChunk"] = function(messageObject) > + { > + chunks.push(messageObject["params"]["chunk"]); > + } > + InspectorTest.eventHandler["Profiler.finishHeapSnapshot"] = function(messageObject) > + { > + var serializedSnapshot = chunks.join(""); > + var parsed = JSON.parse(serializedSnapshot); > + var snapshot = new WebInspector.JSHeapSnapshot(parsed); > + > + var node; > + for (var it = snapshot._allNodes(); it.hasNext(); it.next()) { > + if (it.node.type() === "closure" && it.node.name() === "myEventListener") { > + node = it.node; > + break; > + } > + } > + if (node) > + InspectorTest.log("SUCCESS: found " + node.name()); > + else { > + InspectorTest.log("FAIL: cannot find detached DOM trees root"); > + InspectorTest.completeTest(); > + return; > + } > + please extract the common part and put it into separate helper method in the test harness. > LayoutTests/platform/efl/TestExpectations:1470 > -webkit.org/b/50485 inspector-protocol/heap-snapshot-with-detached-dom-tree.html [ Skip ] > +webkit.org/b/50485 inspector-protocol/heap-snapshot-with-event-listener.html [ Skip ] please move all the heap-snapshot tests into a subfolder.
Yury Semikhatsky
Comment 5 2013-01-30 06:15:24 PST
Yury Semikhatsky
Comment 6 2013-01-30 06:15:55 PST
(In reply to comment #4) > (From update of attachment 185460 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185460&action=review > > please extract the common part and put it into separate helper method in the test harness. > Done. > > LayoutTests/platform/efl/TestExpectations:1470 > > -webkit.org/b/50485 inspector-protocol/heap-snapshot-with-detached-dom-tree.html [ Skip ] > > +webkit.org/b/50485 inspector-protocol/heap-snapshot-with-event-listener.html [ Skip ] > > please move all the heap-snapshot tests into a subfolder. Done.
Ilya Tikhonovsky
Comment 7 2013-01-30 06:18:14 PST
Comment on attachment 185484 [details] Patch lgtm
WebKit Review Bot
Comment 8 2013-01-30 10:31:08 PST
Comment on attachment 185484 [details] Patch Attachment 185484 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16217631 New failing tests: inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html
Yury Semikhatsky
Comment 9 2013-01-31 03:27:12 PST
Note You need to log in before you can comment on or make changes to this bug.