Index: LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html |
diff --git a/LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html b/LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..258cf5f80818c03d30e5eb5de5f895c99e9d8798 |
--- /dev/null |
+++ b/LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html |
@@ -0,0 +1,30 @@ |
+<!doctype html> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<style> |
+ @keyframes anim { |
+ 0% { left: 100px; } |
+ 100% { left: 100px; } |
+ } |
+ |
+ #target { |
+ animation: anim 1s paused; |
+ left: 0px; |
+ } |
+ |
+</style> |
+<div id="target"></div> |
+<script> |
+ test(function() { |
+ var sheet = document.styleSheets[0]; |
+ var rules = sheet.rules; |
+ var keyframes = rules[0]; |
+ |
+ assert_equals(parseInt(getComputedStyle(target).left), 100, 'left offset'); |
+ keyframes.name = 'foobar'; |
+ assert_equals(parseInt(getComputedStyle(target).left), 0, 'left offset'); |
+ keyframes.name = 'anim'; |
+ assert_equals(parseInt(getComputedStyle(target).left), 100, 'left offset'); |
+ |
+ }, "Check that changes to @keyframes name updates the animating element accordingly"); |
+</script> |