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

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: brand new design 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
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/elements-panel-styles-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var dumpText = "";
25 dumpText += treeElement.title.querySelector(".property-name").textConten t;
26 dumpText += ": ";
27 dumpText += treeElement.title.querySelector(".property-value").textConte nt;
28 InspectorTest.addResult(dumpText);
29 for (var trace of treeElement.children()) {
30 var title = trace.title;
31 var dumpText = "";
32 if (trace.title.classList.contains("property-trace-inactive"))
33 dumpText += "OVERLOADED ";
34 dumpText += title.querySelector(".property-trace-value").textContent ;
35 dumpText += " - ";
36 dumpText += title.querySelector(".property-trace-selector").textCont ent;
37 var link = title.querySelector(".trace-link");
38 if (link)
39 dumpText += " " + extractText(link);
40 InspectorTest.addResult(" " + dumpText);
41 }
25 } 42 }
26 } 43 }
27 44
28 InspectorTest.findComputedPropertyWithName = function(name) 45 InspectorTest.findComputedPropertyWithName = function(name)
29 { 46 {
30 var computed = InspectorTest.computedStyleWidget(); 47 var computed = InspectorTest.computedStyleWidget();
31 var items = computed.element.querySelectorAll(".computed-style-property"); 48 var treeOutline = computed._propertiesOutline;
32 for (var i = 0; i < items.length; ++i) { 49 var children = treeOutline.rootElement().children();
33 var item = items[i]; 50 for (var treeElement of children) {
34 var property = item[WebInspector.ComputedStyleWidget._propertySymbol]; 51 var property = treeElement[WebInspector.ComputedStyleWidget._propertySym bol];
35 if (property.name === name) 52 if (property.name === name)
36 return item; 53 return treeElement.title;
37 } 54 }
38 return null; 55 return null;
39 } 56 }
40 57
41 InspectorTest.firstMatchedStyleSection = function() 58 InspectorTest.firstMatchedStyleSection = function()
42 { 59 {
43 return WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].se ctions[1]; 60 return WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].se ctions[1];
44 } 61 }
45 62
46 InspectorTest.firstMediaTextElementInSection = function(section) 63 InspectorTest.firstMediaTextElementInSection = function(section)
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 for (var ui of nodeRow.animations) { 1011 for (var ui of nodeRow.animations) {
995 InspectorTest.addResult(ui.animation().type()); 1012 InspectorTest.addResult(ui.animation().type());
996 InspectorTest.addResult(ui._nameElement.outerHTML); 1013 InspectorTest.addResult(ui._nameElement.outerHTML);
997 InspectorTest.addResult(ui._svg.outerHTML); 1014 InspectorTest.addResult(ui._svg.outerHTML);
998 } 1015 }
999 } 1016 }
1000 } 1017 }
1001 } 1018 }
1002 1019
1003 }; 1020 };
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/elements-panel-styles-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698