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

Unified Diff: LayoutTests/inspector/elements/hide-shortcut.html

Issue 1308663002: DevTools: simplify WI.CSSProperty and WI.CSSStyleDeclaration interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: LayoutTests/inspector/elements/hide-shortcut.html
diff --git a/LayoutTests/inspector/elements/hide-shortcut.html b/LayoutTests/inspector/elements/hide-shortcut.html
index cb41021eb98b2ae1c84c3d73b01247867966453f..8723088ba2aa628e2c04608a39dc6bca844a854f 100644
--- a/LayoutTests/inspector/elements/hide-shortcut.html
+++ b/LayoutTests/inspector/elements/hide-shortcut.html
@@ -62,14 +62,14 @@ function test()
function callback2(style)
{
InspectorTest.addResult("=== Parent node is hidden ===");
- InspectorTest.addResult(style.getLiveProperty("visibility").propertyText);
+ InspectorTest.addResult(getPropertyText(style, "visibility"));
InspectorTest.cssModel.computedStylePromise(childNode.id).then(callback3);
}
function callback3(style)
{
InspectorTest.addResult("=== Child node is hidden ===");
- InspectorTest.addResult(style.getLiveProperty("visibility").propertyText);
+ InspectorTest.addResult(getPropertyText(style, "visibility"));
next();
}
},
@@ -87,14 +87,14 @@ function test()
function callback2(style)
{
InspectorTest.addResult("=== Parent node is visible ===");
- InspectorTest.addResult(style.getLiveProperty("visibility").propertyText);
+ InspectorTest.addResult(getPropertyText(style, "visibility"));
InspectorTest.cssModel.computedStylePromise(childNode.id).then(callback3);
}
function callback3(style)
{
InspectorTest.addResult("=== Child node is visible ===");
- InspectorTest.addResult(style.getLiveProperty("visibility").propertyText);
+ InspectorTest.addResult(getPropertyText(style, "visibility"));
next();
}
},
@@ -146,6 +146,17 @@ function test()
});
}
}
+
+ function getPropertyText(style, propertyName)
+ {
+ for (var property of style.allProperties) {
+ if (!property.activeInStyle())
+ continue;
+ if (property.name === propertyName)
+ return property.propertyText;
+ }
+ return "";
+ }
}
</script>
<style>

Powered by Google App Engine
This is Rietveld 408576698