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

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

Issue 1310883002: DevTools: represent ComputedStyle with simple Map (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test 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 | Source/devtools/front_end/audits/AuditRules.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5a18711f2d292eb7ef9bee4cf038af32c4198184 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"));
pfeldman 2015/08/24 17:48:01 This patch does not apply.
pfeldman 2015/08/24 20:55:50 A new question: how is this related?
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();
}
},
@@ -135,6 +135,11 @@ function test()
}
]);
+ function getPropertyText(computedStyle, propertyName)
+ {
+ return String.sprintf("%s: %s;", propertyName, computedStyle.get(propertyName));
+ }
+
function testPseudoToggle(pseudoNode, next)
{
treeOutline.toggleHideElement(pseudoNode, callback);
« no previous file with comments | « no previous file | Source/devtools/front_end/audits/AuditRules.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698