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

Side by Side Diff: LayoutTests/http/tests/inspector/elements-test.js

Issue 842323005: DevTools: Clean up the Event Listeners pane data representation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove sourceName from the EventListener object Created 5 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 function getInspectorHighlightJSON(nodeId, opt_frameId) 1 function getInspectorHighlightJSON(nodeId, opt_frameId)
2 { 2 {
3 var doc = document; 3 var doc = document;
4 if (opt_frameId) 4 if (opt_frameId)
5 doc = document.getElementById(opt_frameId).contentDocument; 5 doc = document.getElementById(opt_frameId).contentDocument;
6 return window.internals.inspectorHighlightJSON(doc.getElementById(nodeId)); 6 return window.internals.inspectorHighlightJSON(doc.getElementById(nodeId));
7 } 7 }
8 8
9 var initialize_ElementTest = function() { 9 var initialize_ElementTest = function() {
10 10
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 function objectsExpanded() 346 function objectsExpanded()
347 { 347 {
348 var eventListenerSections = WebInspector.panels.elements.sidebarPanes.ev entListeners.sections; 348 var eventListenerSections = WebInspector.panels.elements.sidebarPanes.ev entListeners.sections;
349 for (var i = 0; i < eventListenerSections.length; ++i) { 349 for (var i = 0; i < eventListenerSections.length; ++i) {
350 var eventType = eventListenerSections[i]._title; 350 var eventType = eventListenerSections[i]._title;
351 InspectorTest.addResult(""); 351 InspectorTest.addResult("");
352 InspectorTest.addResult("======== " + eventType + " ========"); 352 InspectorTest.addResult("======== " + eventType + " ========");
353 var eventBarChildren = eventListenerSections[i]._eventBars.children; 353 var eventBarChildren = eventListenerSections[i]._eventBars.children;
354 for (var j = 0; j < eventBarChildren.length; ++j) { 354 for (var j = 0; j < eventBarChildren.length; ++j) {
355 var objectPropertiesSection = eventBarChildren[j]._section; 355 var objectPropertiesSection = eventBarChildren[j]._section;
356 InspectorTest.dumpObjectPropertySection(objectPropertiesSection, { 356 InspectorTest.dumpObjectPropertySection(objectPropertiesSection, {});
357 sourceName: formatSourceNameProperty
358 });
359 } 357 }
360 } 358 }
361 callback(); 359 callback();
362 } 360 }
363
364 function formatSourceNameProperty(value)
365 {
366 return "[clipped-for-test]/" + value.replace(/(.*?\/)LayoutTests/, "Layo utTests");
367 }
368 } 361 }
369 362
370 InspectorTest.dumpObjectPropertySection = function(section, formatters) 363 InspectorTest.dumpObjectPropertySection = function(section, formatters)
371 { 364 {
372 var expandedSubstring = section.expanded ? "[expanded]" : "[collapsed]"; 365 var expandedSubstring = section.expanded ? "[expanded]" : "[collapsed]";
373 var titleElement = section.titleElement.firstElementChild ? section.titleEle ment.firstElementChild.shadowRoot.lastChild.textContent : section.titleElement.t extContent; 366 var titleElement = section.titleElement.firstElementChild ? section.titleEle ment.firstElementChild.shadowRoot.lastChild.textContent : section.titleElement.t extContent;
374 InspectorTest.addResult(expandedSubstring + " " + titleElement + " " + secti on.subtitleAsTextForTest); 367 InspectorTest.addResult(expandedSubstring + " " + titleElement + " " + secti on.subtitleAsTextForTest);
375 if (!section.propertiesForTest) 368 if (!section.propertiesForTest)
376 return; 369 return;
377 370
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 function innerCallback(result) 885 function innerCallback(result)
893 { 886 {
894 InspectorTest.addResult(nodeId + ": " + result.description); 887 InspectorTest.addResult(nodeId + ": " + result.description);
895 callback(); 888 callback();
896 } 889 }
897 opt_frameId = opt_frameId || ""; 890 opt_frameId = opt_frameId || "";
898 InspectorTest.evaluateInPage("getInspectorHighlightJSON(\"" + nodeId + "\", \"" + opt_frameId + "\")", innerCallback); 891 InspectorTest.evaluateInPage("getInspectorHighlightJSON(\"" + nodeId + "\", \"" + opt_frameId + "\")", innerCallback);
899 } 892 }
900 893
901 }; 894 };
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/event-listener-sidebar-expected.txt » ('j') | Source/devtools/protocol.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698