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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/animation-iteration-count.html

Issue 2121913002: [Typed OM] Add CSSValue -> CSSNumberValue conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 1 month 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 | third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/animation-iteration-count.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/animation-iteration-count.html b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/animation-iteration-count.html
new file mode 100644
index 0000000000000000000000000000000000000000..89fc6719b0ea4945887350907462f7afb47aced0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/animation-iteration-count.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<div id="testElement">text</div>
+
+<script>
+
+test(function() {
+ testElement.styleMap.set('animation-iteration-count', new CSSNumberValue(3.5));
+ assert_equals(testElement.styleMap.get('animation-iteration-count').value, 3.5);
+ assert_equals(getComputedStyleMap(testElement).get('animation-iteration-count').value, 3.5);
+}, "Valid animation-iteration-count round trips inline->computed styles.");
+
+test(function() {
+ assert_throws(new TypeError(), function() {
+ testElement.styleMap.set('animation-iteration-count', new CSSNumberValue(-5.2));
+ });
+}, "Invalid number for animation-iteration-count is not accepted");
+
+</script>
+
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698