simon.fraser@apple.com | c2588ab | 2015-10-25 01:33:02 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <style> |
| 5 | #box1 { |
| 6 | position: relative; |
| 7 | left: 10px; |
| 8 | top: 10px; |
| 9 | height: 100px; |
| 10 | width: 100px; |
| 11 | background-color: blue; |
dino@apple.com | 9c26380 | 2016-08-02 23:43:30 +0000 | [diff] [blame] | 12 | animation: anim1 0 2s linear forwards; |
simon.fraser@apple.com | c2588ab | 2015-10-25 01:33:02 +0000 | [diff] [blame] | 13 | } |
| 14 | @keyframes anim1 { |
| 15 | from { left: 400px; } |
| 16 | 25% { left: 0px; } |
| 17 | 51% { left: 250px; } |
| 18 | to { left: 100px; } |
| 19 | } |
| 20 | </style> |
| 21 | <script src="resources/animation-test-helpers.js"></script> |
| 22 | <script> |
| 23 | |
| 24 | const expectedValues = [ |
| 25 | // [animation-name, time, element-id, property, expected-value, tolerance] |
jbedard@apple.com | ba9b1ed | 2018-04-17 23:08:31 +0000 | [diff] [blame] | 26 | ["anim1", 1, "box1", "left", 100, 2], |
simon.fraser@apple.com | c2588ab | 2015-10-25 01:33:02 +0000 | [diff] [blame] | 27 | ]; |
| 28 | |
| 29 | runAnimationTest(expectedValues); |
| 30 | </script> |
| 31 | </head> |
| 32 | <body> |
| 33 | <p>Fill-forwards state should be the last keyframe state, even with a zero-duration animation.</p> |
| 34 | <div id="box1"></div> |
| 35 | <div id="result"></div> |
| 36 | </body> |
| 37 | </html> |