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

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

Issue 1312893006: DevTools: revert back ComputedStylesSidebar (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nit Created 5 years, 3 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 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()
16 { 16 {
17 var computed = InspectorTest.computedStyleWidget(); 17 var computed = InspectorTest.computedStyleWidget();
18 var items = computed.element.querySelectorAll(".computed-style-property"); 18 var treeOutline = computed._propertiesOutline;
19 for (var i = 0; i < items.length; ++i) { 19 var children = treeOutline.rootElement().children();
20 var item = items[i]; 20 for (var treeElement of children) {
21 var property = item[WebInspector.ComputedStyleWidget._propertySymbol]; 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 InspectorTest.addResult(item.textContent); 24 InspectorTest.addResult(treeElement.title.textContent);
25 for (var trace of treeElement.children()) {
26 var dumpText = "";
27 if (trace.title.classList.contains("property-trace-inactive"))
28 dumpText += "OVERLOADED ";
29 dumpText += trace.title.textContent;
30 var link = trace.title.querySelector(".trace-link");
31 if (link)
32 dumpText += " " + extractText(link);
33 InspectorTest.addResult(" " + dumpText);
34 }
25 } 35 }
26 } 36 }
27 37
28 InspectorTest.findComputedPropertyWithName = function(name) 38 InspectorTest.findComputedPropertyWithName = function(name)
29 { 39 {
30 var computed = InspectorTest.computedStyleWidget(); 40 var computed = InspectorTest.computedStyleWidget();
31 var items = computed.element.querySelectorAll(".computed-style-property"); 41 var treeOutline = computed._propertiesOutline;
32 for (var i = 0; i < items.length; ++i) { 42 var children = treeOutline.rootElement().children();
33 var item = items[i]; 43 for (var treeElement of children) {
34 var property = item[WebInspector.ComputedStyleWidget._propertySymbol]; 44 var property = treeElement[WebInspector.ComputedStyleWidget._propertySym bol];
35 if (property.name === name) 45 if (property.name === name)
36 return item; 46 return treeElement.title;
37 } 47 }
38 return null; 48 return null;
39 } 49 }
40 50
41 InspectorTest.firstMatchedStyleSection = function() 51 InspectorTest.firstMatchedStyleSection = function()
42 { 52 {
43 return WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].se ctions[1]; 53 return WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].se ctions[1];
44 } 54 }
45 55
46 InspectorTest.firstMediaTextElementInSection = function(section) 56 InspectorTest.firstMediaTextElementInSection = function(section)
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 for (var ui of nodeRow.animations) { 1004 for (var ui of nodeRow.animations) {
995 InspectorTest.addResult(ui.animation().type()); 1005 InspectorTest.addResult(ui.animation().type());
996 InspectorTest.addResult(ui._nameElement.outerHTML); 1006 InspectorTest.addResult(ui._nameElement.outerHTML);
997 InspectorTest.addResult(ui._svg.outerHTML); 1007 InspectorTest.addResult(ui._svg.outerHTML);
998 } 1008 }
999 } 1009 }
1000 } 1010 }
1001 } 1011 }
1002 1012
1003 }; 1013 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698