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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_setGet.html

Issue 2096133002: [Typed OM] Add support for properties which take numbers in CSSProperties.in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync to head 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/typedcssom/inlinestyle/inlineStylePropertyMap_setGet.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_setGet.html b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_setGet.html
index 71bfaaa827497f197e8d7bcce6a47c2ac4cd3828..94b2ca5b4647f5734615f4abf10e975d99dae8d5 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_setGet.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_setGet.html
@@ -69,5 +69,18 @@ test(function() {
getComputedStyle(testElement).width;
}, "Setting null to a property does not crash");
+test(function() {
+ var values = [new CSSNumberValue(3), new CSSKeywordValue("infinite")];
+ testElement.styleMap.set('animation-iteration-count', values);
+
+ var result = testElement.styleMap.getAll('animation-iteration-count');
+ assert_equals(result.length, 2);
+ assert_true(result[0] instanceof CSSNumberValue);
+ assert_true(result[1] instanceof CSSKeywordValue);
+ assert_equals(result[0].value, 3);
+ assert_equals(result[1].value, "infinite");
+
+ assert_equals(testElement.style.animationIterationCount, "3, infinite");
+}, "Setting a property with mixed types works if the types are all valid");
</script>

Powered by Google App Engine
This is Rietveld 408576698