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

Unified Diff: LayoutTests/inspector/elements/styles-4/styles-history.html

Issue 1308663002: DevTools: simplify WI.CSSProperty and WI.CSSStyleDeclaration interfaces (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
Index: LayoutTests/inspector/elements/styles-4/styles-history.html
diff --git a/LayoutTests/inspector/elements/styles-4/styles-history.html b/LayoutTests/inspector/elements/styles-4/styles-history.html
index 6a5b111f3cb04d5a3704445989a82eb73d361c74..a6ece5fb0275462ea6e0326e4e267d469e77663d 100644
--- a/LayoutTests/inspector/elements/styles-4/styles-history.html
+++ b/LayoutTests/inspector/elements/styles-4/styles-history.html
@@ -64,7 +64,7 @@ function test()
function step1(style)
{
- var property = style.getLiveProperty("margin");
+ var property = getLiveProperty(style, "margin");
property.setText("margin:25px;", false, true).then(dumpHistory(next));
}
},
@@ -75,7 +75,7 @@ function test()
function step1(style)
{
- var property = style.getLiveProperty("margin");
+ var property = getLiveProperty(style, "margin");
InspectorTest.addSniffer(WebInspector.UISourceCode.prototype, "addRevision", dumpHistory(next));
property.setText("margin:30px;", true, true);
}
@@ -124,6 +124,17 @@ function test()
}
return result;
}
+
+ function getLiveProperty(style, name)
+ {
+ for (var property of style.allProperties) {
+ if (!property.activeInStyle())
+ continue;
+ if (property.name === name)
+ return property;
+ }
+ return null;
+ }
}
</script>

Powered by Google App Engine
This is Rietveld 408576698