| OLD | NEW |
| 1 var initialize_ElementTest = function() { | 1 var initialize_ElementTest = function() { |
| 2 | 2 |
| 3 InspectorTest.preloadPanel("elements"); | 3 InspectorTest.preloadPanel("elements"); |
| 4 | 4 |
| 5 InspectorTest.inlineStyleSection = function() | 5 InspectorTest.inlineStyleSection = function() |
| 6 { | 6 { |
| 7 return WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].se
ctions[0]; | 7 return WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].se
ctions[0]; |
| 8 } | 8 } |
| 9 | 9 |
| 10 InspectorTest.computedStyleWidget = function() | 10 InspectorTest.computedStyleWidget = function() |
| 11 { | 11 { |
| 12 return WebInspector.panels.elements.sidebarPanes.computedStyle.children()[0] | 12 return WebInspector.panels.elements.sidebarPanes.computedStyle.children()[0] |
| 13 } | 13 } |
| 14 | 14 |
| 15 InspectorTest.dumpComputedStyle = function() | 15 InspectorTest.dumpComputedStyle = function(doNotAutoExpand) |
| 16 { | 16 { |
| 17 var computed = InspectorTest.computedStyleWidget(); | 17 var computed = InspectorTest.computedStyleWidget(); |
| 18 var treeOutline = computed._propertiesOutline; | 18 var treeOutline = computed._propertiesOutline; |
| 19 var children = treeOutline.rootElement().children(); | 19 var children = treeOutline.rootElement().children(); |
| 20 for (var treeElement of children) { | 20 for (var treeElement of children) { |
| 21 var property = treeElement[WebInspector.ComputedStyleWidget._propertySym
bol]; | 21 var property = treeElement[WebInspector.ComputedStyleWidget._propertySym
bol]; |
| 22 if (property.name === "width" || property.name === "height") | 22 if (property.name === "width" || property.name === "height") |
| 23 continue; | 23 continue; |
| 24 var dumpText = ""; | 24 var dumpText = ""; |
| 25 dumpText += treeElement.title.querySelector(".property-name").textConten
t; | 25 dumpText += treeElement.title.querySelector(".property-name").textConten
t; |
| 26 dumpText += " "; | 26 dumpText += " "; |
| 27 dumpText += treeElement.title.querySelector(".property-value").textConte
nt; | 27 dumpText += treeElement.title.querySelector(".property-value").textConte
nt; |
| 28 InspectorTest.addResult(dumpText); | 28 InspectorTest.addResult(dumpText); |
| 29 if (doNotAutoExpand && !treeElement.expanded) |
| 30 continue; |
| 29 for (var trace of treeElement.children()) { | 31 for (var trace of treeElement.children()) { |
| 30 var title = trace.title; | 32 var title = trace.title; |
| 31 var dumpText = ""; | 33 var dumpText = ""; |
| 32 if (trace.title.classList.contains("property-trace-inactive")) | 34 if (trace.title.classList.contains("property-trace-inactive")) |
| 33 dumpText += "OVERLOADED "; | 35 dumpText += "OVERLOADED "; |
| 34 dumpText += title.querySelector(".property-trace-value").textContent
; | 36 dumpText += title.querySelector(".property-trace-value").textContent
; |
| 35 dumpText += " - "; | 37 dumpText += " - "; |
| 36 dumpText += title.querySelector(".property-trace-selector").textCont
ent; | 38 dumpText += title.querySelector(".property-trace-selector").textCont
ent; |
| 37 var link = title.querySelector(".trace-link"); | 39 var link = title.querySelector(".trace-link"); |
| 38 if (link) | 40 if (link) |
| 39 dumpText += " " + extractText(link); | 41 dumpText += " " + extractText(link); |
| 40 InspectorTest.addResult(" " + dumpText); | 42 InspectorTest.addResult(" " + dumpText); |
| 41 } | 43 } |
| 42 } | 44 } |
| 43 } | 45 } |
| 44 | 46 |
| 45 InspectorTest.findComputedPropertyWithName = function(name) | 47 InspectorTest.findComputedPropertyWithName = function(name) |
| 46 { | 48 { |
| 47 var computed = InspectorTest.computedStyleWidget(); | 49 var computed = InspectorTest.computedStyleWidget(); |
| 48 var treeOutline = computed._propertiesOutline; | 50 var treeOutline = computed._propertiesOutline; |
| 49 var children = treeOutline.rootElement().children(); | 51 var children = treeOutline.rootElement().children(); |
| 50 for (var treeElement of children) { | 52 for (var treeElement of children) { |
| 51 var property = treeElement[WebInspector.ComputedStyleWidget._propertySym
bol]; | 53 var property = treeElement[WebInspector.ComputedStyleWidget._propertySym
bol]; |
| 52 if (property.name === name) | 54 if (property.name === name) |
| 53 return treeElement.title; | 55 return treeElement; |
| 54 } | 56 } |
| 55 return null; | 57 return null; |
| 56 } | 58 } |
| 57 | 59 |
| 58 InspectorTest.firstMatchedStyleSection = function() | 60 InspectorTest.firstMatchedStyleSection = function() |
| 59 { | 61 { |
| 60 return WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].se
ctions[1]; | 62 return WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].se
ctions[1]; |
| 61 } | 63 } |
| 62 | 64 |
| 63 InspectorTest.firstMediaTextElementInSection = function(section) | 65 InspectorTest.firstMediaTextElementInSection = function(section) |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 InspectorTest.dumpAnimationTimeline = function(timeline) | 973 InspectorTest.dumpAnimationTimeline = function(timeline) |
| 972 { | 974 { |
| 973 for (var ui of timeline._uiAnimations) { | 975 for (var ui of timeline._uiAnimations) { |
| 974 InspectorTest.addResult(ui.animation().type()); | 976 InspectorTest.addResult(ui.animation().type()); |
| 975 InspectorTest.addResult(ui._nameElement.innerHTML); | 977 InspectorTest.addResult(ui._nameElement.innerHTML); |
| 976 InspectorTest.addResult(ui._svg.innerHTML); | 978 InspectorTest.addResult(ui._svg.innerHTML); |
| 977 } | 979 } |
| 978 } | 980 } |
| 979 | 981 |
| 980 }; | 982 }; |
| OLD | NEW |