| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <title>Test of animation-direction</title> | |
| 3 <script src="../resources/testharness.js"></script> | |
| 4 <script src="../resources/testharnessreport.js"></script> | |
| 5 <style> | |
| 6 #target { | |
| 7 animation-direction: normal; | |
| 8 animation-duration: 2s; | |
| 9 animation-iteration-count: 2; | |
| 10 animation-name: move1; | |
| 11 animation-play-state: paused; | |
| 12 animation-timing-function: linear; | |
| 13 background-color: red; | |
| 14 height: 100px; | |
| 15 left: 0px; | |
| 16 margin: 0; | |
| 17 position: absolute; | |
| 18 top: 100px; | |
| 19 width: 100px; | |
| 20 } | |
| 21 @keyframes move1 { | |
| 22 from { left: 0px; } | |
| 23 to { left: 200px; } | |
| 24 } | |
| 25 | |
| 26 </style> | |
| 27 <div id="target"></div> | |
| 28 <script> | |
| 29 test(function() { | |
| 30 target.style.animationDelay = '-0.5s'; | |
| 31 assert_equals(getComputedStyle(target).left, '50px'); | |
| 32 | |
| 33 target.style.animationDelay = '-1s'; | |
| 34 assert_equals(getComputedStyle(target).left, '100px'); | |
| 35 | |
| 36 target.style.animationDelay = '-2.5s'; | |
| 37 assert_equals(getComputedStyle(target).left, '50px'); | |
| 38 }, "animation-direction normal plays forwards"); | |
| 39 </script> | |
| OLD | NEW |