| OLD | NEW |
| 1 <!DOCTYPE> | 1 <!DOCTYPE> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <style> | 5 <style> |
| 6 #test { | 6 #test { |
| 7 color: #00F; | 7 color: #00F; |
| 8 -webkit-transition: color 1s linear; | 8 -webkit-transition: color 10s linear; |
| 9 } | 9 } |
| 10 | 10 |
| 11 #test.changed { | 11 #test.changed { |
| 12 color: #F00; | 12 color: #F00; |
| 13 } | 13 } |
| 14 </style> | 14 </style> |
| 15 <script src="resources/transition-test-helpers.js"></script> | 15 <script src="../animations/resources/animation-test-helpers.js"></script> |
| 16 <script type="text/javascript"> | 16 <script type="text/javascript"> |
| 17 const expectedValues = [ | 17 const expectedValues = [ |
| 18 // [time, element-id, property, expected-value, tolerance, post-completion
callback, should-be-transitioning] | 18 // [time, element-id, property, expected-value, tolerance, post-completion
callback, should-be-transitioning] |
| 19 [0.4998, 'test', 'color', [127, 0, 128], 0], | 19 [4.998, 'test', 'color', [127, 0, 128], 0], |
| 20 [0.5000, 'test', 'color', [128, 0, 128], 0], | 20 [5.000, 'test', 'color', [128, 0, 128], 0], |
| 21 [0.5002, 'test', 'color', [128, 0, 127], 0], | 21 [5.002, 'test', 'color', [128, 0, 127], 0], |
| 22 ]; | 22 ]; |
| 23 | 23 |
| 24 function setupTest() | 24 function setupTest() |
| 25 { | 25 { |
| 26 document.getElementById('test').className = 'changed'; | 26 document.getElementById('test').className = 'changed'; |
| 27 } | 27 } |
| 28 | 28 |
| 29 runTransitionTest(expectedValues, setupTest, usePauseAPI); | 29 runTransitionTest(expectedValues, setupTest, usePauseAPI); |
| 30 </script> | 30 </script> |
| 31 </head> | 31 </head> |
| 32 <body> | 32 <body> |
| 33 | 33 |
| 34 <div id="test"> | 34 <div id="test"> |
| 35 This test will probably fail when run manually; it requires the pause API fo
r accurate results. | 35 This test will probably fail when run manually; it requires the pause API fo
r accurate results. |
| 36 </div> | 36 </div> |
| 37 | 37 |
| 38 <div id="result"></div> | 38 <div id="result"></div> |
| 39 </body> | 39 </body> |
| 40 </html> | 40 </html> |
| OLD | NEW |