dino@apple.com | 5863503 | 2018-09-12 20:59:33 +0000 | [diff] [blame] | 1 | <!DOCTYPE><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] --> |
simon.fraser@apple.com | 0422407 | 2012-09-14 21:52:22 +0000 | [diff] [blame] | 2 | |
| 3 | <html> |
| 4 | <head> |
| 5 | <style> |
| 6 | .box { |
| 7 | height: 100px; |
| 8 | width: 100px; |
| 9 | margin: 10px; |
| 10 | background-color: white; |
| 11 | -webkit-transition-property: width; |
| 12 | } |
| 13 | |
| 14 | .box { |
| 15 | -webkit-transition: 2s; |
| 16 | } |
| 17 | |
| 18 | #box.final { |
| 19 | background-color: black; |
| 20 | } |
| 21 | |
| 22 | </style> |
| 23 | <script src="resources/transition-test-helpers.js"></script> |
| 24 | <script type="text/javascript"> |
| 25 | |
| 26 | const expectedValues = [ |
| 27 | // [time, element-id, property, expected-value, tolerance] |
| 28 | [0.5, 'box', 'background-color', [153, 153, 153], 4], |
| 29 | ]; |
| 30 | |
| 31 | function setupTest() |
| 32 | { |
| 33 | document.getElementById('box').className = 'box final'; |
| 34 | } |
| 35 | |
| 36 | runTransitionTest(expectedValues, setupTest, usePauseAPI); |
| 37 | </script> |
| 38 | </head> |
| 39 | <body> |
| 40 | |
| 41 | <div id="box" class="box"></div> |
| 42 | |
| 43 | <div id="result"> |
| 44 | </div> |
| 45 | |
| 46 | </body> |
| 47 | </html> |