| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <style> | 5 <style> |
| 6 #box { | 6 #box { |
| 7 position: absolute; | 7 position: absolute; |
| 8 height: 100px; | 8 height: 100px; |
| 9 width: 100px; | 9 width: 100px; |
| 10 background-color: blue; | 10 background-color: blue; |
| 11 -webkit-transition-duration: 0, 0.5s; | 11 -webkit-transition-duration: 0, 0.5s; |
| 12 -webkit-transition-timing-function: linear; | 12 -webkit-transition-timing-function: linear; |
| 13 -webkit-transition-property: top, left; | 13 -webkit-transition-property: top, left; |
| 14 } | 14 } |
| 15 </style> | 15 </style> |
| 16 <script src="resources/transition-test-helpers.js"></script> | 16 <script src="../animations/resources/animation-test-helpers.js"></script> |
| 17 <script type="text/javascript"> | 17 <script type="text/javascript"> |
| 18 | 18 |
| 19 const expectedValues = [ | 19 const expectedValues = [ |
| 20 // [time, element-id, property, expected-value, tolerance, post-completion
callback, should-be-transitioning] | 20 // [time, element-id, property, expected-value, tolerance, post-completion
callback, should-be-transitioning] |
| 21 [0.25, "box", "left", 50, 10, null, shouldBeTransitioning], | 21 [0.25, "box", "left", 50, 10, null, shouldBeTransitioning], |
| 22 [0.25, "box", "top", 100, 10, null, shouldNotBeTransitioning], | 22 [0.25, "box", "top", 100, 10, null, shouldNotBeTransitioning], |
| 23 ]; | 23 ]; |
| 24 | 24 |
| 25 function setupTest() | 25 function setupTest() |
| 26 { | 26 { |
| 27 var box = document.getElementById('box'); | 27 var box = document.getElementById('box'); |
| 28 box.style.top = '100px'; | 28 box.style.top = '100px'; |
| 29 box.style.left = '100px'; | 29 box.style.left = '100px'; |
| 30 } | 30 } |
| 31 | 31 |
| 32 runTransitionTest(expectedValues, setupTest, usePauseAPI); | 32 runTransitionTest(expectedValues, setupTest, usePauseAPI); |
| 33 </script> | 33 </script> |
| 34 </head> | 34 </head> |
| 35 <body> | 35 <body> |
| 36 | 36 |
| 37 <p>Tests that with a zero duration transition on top, it does not animate</p> | 37 <p>Tests that with a zero duration transition on top, it does not animate</p> |
| 38 <div id="box"> | 38 <div id="box"> |
| 39 </div> | 39 </div> |
| 40 <div id="result"> | 40 <div id="result"> |
| 41 </div> | 41 </div> |
| 42 </body> | 42 </body> |
| 43 </html> | 43 </html> |
| OLD | NEW |