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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js

Issue 2574603002: DevTools: Fix Elements tab event listener removal (Closed)
Patch Set: address feedback Created 4 years 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 | third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
index e293c62468665e71eaf20471f0ddbf609151ee5b..a1ded28d32e7f862b814d7e80f1d7272621cf145 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
@@ -443,9 +443,23 @@ InspectorTest.showEventListenersWidget = function()
return UI.viewManager.showView("elements.eventListeners");
}
-InspectorTest.expandAndDumpSelectedElementEventListeners = function(callback)
+InspectorTest.expandAndDumpSelectedElementEventListeners = function(callback, force)
{
- InspectorTest.expandAndDumpEventListeners(InspectorTest.eventListenersWidget()._eventListenersView, callback);
+ InspectorTest.expandAndDumpEventListeners(InspectorTest.eventListenersWidget()._eventListenersView, callback, force);
+}
+
+InspectorTest.removeFirstEventListener = function()
+{
+ var treeOutline = InspectorTest.eventListenersWidget()._eventListenersView._treeOutline;
+ var listenerTypes = treeOutline.rootElement().children();
+ for (var i = 0; i < listenerTypes.length; i++) {
+ var listeners = listenerTypes[i].children();
+ if (listeners.length && !listenerTypes[i].hidden) {
+ listeners[0].eventListener().remove();
+ listeners[0]._removeListenerBar();
+ break;
+ }
+ }
}
InspectorTest.dumpObjectPropertySectionDeep = function(section)
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698