simon.fraser@apple.com | 570ff4e | 2008-09-29 21:09:18 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 | "http://www.w3.org/TR/html4/loose.dtd"> |
| 3 | |
| 4 | <html lang="en"> |
| 5 | <head> |
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 7 | <title>Test of @import rule for importing keyframes</title> |
| 8 | <style type="text/css"> @import "resources/keyframes.css"; </style> |
| 9 | <style type="text/css" media="screen"> |
| 10 | #box { |
| 11 | position: absolute; |
| 12 | left: 0; |
| 13 | top: 100px; |
| 14 | height: 100px; |
| 15 | width: 100px; |
| 16 | background-color: blue; |
| 17 | -webkit-animation-duration: 1s; |
| 18 | -webkit-animation-timing-function: linear; |
| 19 | -webkit-animation-name: "anim"; |
| 20 | } |
| 21 | </style> |
simon.fraser@apple.com | 9353113 | 2011-04-26 03:16:31 +0000 | [diff] [blame] | 22 | <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script> |
simon.fraser@apple.com | 570ff4e | 2008-09-29 21:09:18 +0000 | [diff] [blame] | 23 | <script type="text/javascript" charset="utf-8"> |
simon.fraser@apple.com | 570ff4e | 2008-09-29 21:09:18 +0000 | [diff] [blame] | 24 | |
pol@apple.com | a259bc1 | 2008-12-11 00:48:35 +0000 | [diff] [blame] | 25 | const expectedValues = [ |
| 26 | // [animation-name, time, element-id, property, expected-value, tolerance] |
| 27 | ["anim", 0.3, "box", "left", 100, 1], |
| 28 | ["anim", 0.7, "box", "left", 200, 1], |
| 29 | ]; |
simon.fraser@apple.com | 570ff4e | 2008-09-29 21:09:18 +0000 | [diff] [blame] | 30 | |
pol@apple.com | a259bc1 | 2008-12-11 00:48:35 +0000 | [diff] [blame] | 31 | runAnimationTest(expectedValues); |
simon.fraser@apple.com | 570ff4e | 2008-09-29 21:09:18 +0000 | [diff] [blame] | 32 | |
| 33 | </script> |
| 34 | </head> |
| 35 | <body> |
| 36 | This test performs an animation of the left property. It should stop for 100ms at 100px and 200px |
| 37 | We test for those values 50ms after it has stopped at each position. The keyframes are imported |
| 38 | so this tests whether they come in correctly. |
| 39 | <div id="box"> |
| 40 | </div> |
| 41 | <div id="result"> |
| 42 | </div> |
| 43 | </body> |
| 44 | </html> |