Index: third_party/WebKit/LayoutTests/web-animations-api/reject-hyphen.html |
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/reject-hyphen.html b/third_party/WebKit/LayoutTests/web-animations-api/reject-hyphen.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6872cec433ed381bde836ff3edba9aeba6d8103b |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/web-animations-api/reject-hyphen.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE html> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<style> |
+ |
+div { font-size: 10px; } |
+ |
+</style> |
+<div id='element'></div> |
+<script> |
+ |
+var element = document.getElementById('element'); |
+ |
+function animate(property, value) { |
+ var keyframes = [ |
+ {offset: 0}, |
+ {offset: 1}, |
+ ]; |
+ keyframes[0][property] = value; |
+ keyframes[1][property] = value; |
+ |
+ try { element.animate(keyframes, {fill: 'forwards'}); } catch(e) {} |
+} |
alancutter (OOO until 2018)
2016/03/10 01:26:50
Why is there a try catch?
This helper function is
Eric Willigers
2016/03/10 01:56:04
Fixed.
|
+ |
+test(function() { |
+ animate('font-size', '20px'); |
+ assert_equals(getComputedStyle(element).fontSize, '10px'); |
+ |
+ animate('fontSize', '30px'); |
+ assert_equals(getComputedStyle(element).fontSize, '30px'); |
+}, 'Hyphenated propery names are rejected.'); |
alancutter (OOO until 2018)
2016/03/10 01:26:50
s/rejected/ignored/
Eric Willigers
2016/03/10 01:56:04
Done.
|
+ |
+</script> |