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

Unified 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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/elements-panel-styles-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector/elements-test.js
diff --git a/LayoutTests/http/tests/inspector/elements-test.js b/LayoutTests/http/tests/inspector/elements-test.js
index d5b643e5167db096cb76680660fb5e7a7736d169..638d7e2ee89a0bef4f7b9d2073cead033ccb3aec 100644
--- a/LayoutTests/http/tests/inspector/elements-test.js
+++ b/LayoutTests/http/tests/inspector/elements-test.js
@@ -15,25 +15,42 @@ InspectorTest.computedStyleWidget = function()
InspectorTest.dumpComputedStyle = function()
{
var computed = InspectorTest.computedStyleWidget();
- var items = computed.element.querySelectorAll(".computed-style-property");
- for (var i = 0; i < items.length; ++i) {
- var item = items[i];
- var property = item[WebInspector.ComputedStyleWidget._propertySymbol];
+ var treeOutline = computed._propertiesOutline;
+ var children = treeOutline.rootElement().children();
+ for (var treeElement of children) {
+ var property = treeElement[WebInspector.ComputedStyleWidget._propertySymbol];
if (property.name === "width" || property.name === "height")
continue;
- InspectorTest.addResult(item.textContent);
+ var dumpText = "";
+ dumpText += treeElement.title.querySelector(".property-name").textContent;
+ dumpText += ": ";
+ dumpText += treeElement.title.querySelector(".property-value").textContent;
+ InspectorTest.addResult(dumpText);
+ for (var trace of treeElement.children()) {
+ var title = trace.title;
+ var dumpText = "";
+ if (trace.title.classList.contains("property-trace-inactive"))
+ dumpText += "OVERLOADED ";
+ dumpText += title.querySelector(".property-trace-value").textContent;
+ dumpText += " - ";
+ dumpText += title.querySelector(".property-trace-selector").textContent;
+ var link = title.querySelector(".trace-link");
+ if (link)
+ dumpText += " " + extractText(link);
+ InspectorTest.addResult(" " + dumpText);
+ }
}
}
InspectorTest.findComputedPropertyWithName = function(name)
{
var computed = InspectorTest.computedStyleWidget();
- var items = computed.element.querySelectorAll(".computed-style-property");
- for (var i = 0; i < items.length; ++i) {
- var item = items[i];
- var property = item[WebInspector.ComputedStyleWidget._propertySymbol];
+ var treeOutline = computed._propertiesOutline;
+ var children = treeOutline.rootElement().children();
+ for (var treeElement of children) {
+ var property = treeElement[WebInspector.ComputedStyleWidget._propertySymbol];
if (property.name === name)
- return item;
+ return treeElement.title;
}
return null;
}
« 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