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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js

Issue 2152313002: DevTools: preserve computed properties expansion on Computed Style re-rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
index ef347db53d4778a30b554e56f8be2c37db139f1e..0b4540716024033ca3add7d571568e2f9faa9615 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
@@ -12,7 +12,7 @@ InspectorTest.computedStyleWidget = function()
return WebInspector.panels.elements.sidebarPanes.computedStyle.children()[0]
}
-InspectorTest.dumpComputedStyle = function()
+InspectorTest.dumpComputedStyle = function(doNotAutoExpand)
{
var computed = InspectorTest.computedStyleWidget();
var treeOutline = computed._propertiesOutline;
@@ -26,6 +26,8 @@ InspectorTest.dumpComputedStyle = function()
dumpText += " ";
dumpText += treeElement.title.querySelector(".property-value").textContent;
InspectorTest.addResult(dumpText);
+ if (doNotAutoExpand && !treeElement.expanded)
+ continue;
for (var trace of treeElement.children()) {
var title = trace.title;
var dumpText = "";
@@ -50,7 +52,7 @@ InspectorTest.findComputedPropertyWithName = function(name)
for (var treeElement of children) {
var property = treeElement[WebInspector.ComputedStyleWidget._propertySymbol];
if (property.name === name)
- return treeElement.title;
+ return treeElement;
}
return null;
}

Powered by Google App Engine
This is Rietveld 408576698