| 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 height: 100px; | 7 height: 100px; |
| 8 width: 100px; | 8 width: 100px; |
| 9 background-color: blue; | 9 background-color: blue; |
| 10 -webkit-transform: translateX(0px) rotate(0deg); | 10 -webkit-transform: translateX(0px) rotate(0deg); |
| 11 -webkit-transition-duration: 2s; | 11 -webkit-transition-duration: 2s; |
| 12 -webkit-transition-timing-function: linear; | 12 -webkit-transition-timing-function: linear; |
| 13 -webkit-transition-property: -webkit-transform; | 13 -webkit-transition-property: -webkit-transform; |
| 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 function DegreesToRotation(angle) | 19 function DegreesToRotation(angle) |
| 20 { | 20 { |
| 21 return roundNumber(Math.cos(angle * Math.PI / 180), 5); | 21 return roundNumber(Math.cos(angle * Math.PI / 180), 5); |
| 22 } | 22 } |
| 23 | 23 |
| 24 const expectedValues = [ | 24 const expectedValues = [ |
| 25 // [time, element-id, property, expected-value, tolerance] | 25 // [time, element-id, property, expected-value, tolerance] |
| 26 [0.5, "box", "-webkit-transform.0", DegreesToRotation(135), DegreesToRotat
ion(10)], | 26 [0.5, "box", "-webkit-transform.0", DegreesToRotation(135), DegreesToRotat
ion(10)], |
| (...skipping 14 matching lines...) Expand all Loading... |
| 41 <p> | 41 <p> |
| 42 Box should spin 540 degrees because that is the specified rotation and the trans
form operation lists match, | 42 Box should spin 540 degrees because that is the specified rotation and the trans
form operation lists match, |
| 43 so we should animate each operation separately. | 43 so we should animate each operation separately. |
| 44 </p> | 44 </p> |
| 45 <div id="box"> | 45 <div id="box"> |
| 46 </div> | 46 </div> |
| 47 <div id="result"> | 47 <div id="result"> |
| 48 </div> | 48 </div> |
| 49 </body> | 49 </body> |
| 50 </html> | 50 </html> |
| OLD | NEW |