| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 #box { | 4 #box { |
| 5 position: absolute; | 5 position: absolute; |
| 6 left: 100px; | 6 left: 100px; |
| 7 top: 100px; | 7 top: 100px; |
| 8 height: 100px; | 8 height: 100px; |
| 9 width: 100px; | 9 width: 100px; |
| 10 background-color: red; | 10 background-color: red; |
| 11 -webkit-animation: anim 1s linear infinite; | 11 animation: anim 1s linear infinite; |
| 12 } | 12 } |
| 13 #boxShorthand { | 13 #boxShorthand { |
| 14 position: absolute; | 14 position: absolute; |
| 15 left: 100px; | 15 left: 100px; |
| 16 top: 200px; | 16 top: 200px; |
| 17 height: 100px; | 17 height: 100px; |
| 18 width: 100px; | 18 width: 100px; |
| 19 background-color: red; | 19 background-color: red; |
| 20 -webkit-animation: animShorthand 1s linear infinite; | 20 animation: animShorthand 1s linear infinite; |
| 21 } | 21 } |
| 22 #boxStatic { | 22 #boxStatic { |
| 23 position: absolute; | 23 position: absolute; |
| 24 left: 100px; | 24 left: 100px; |
| 25 top: 300px; | 25 top: 300px; |
| 26 height: 100px; | 26 height: 100px; |
| 27 width: 100px; | 27 width: 100px; |
| 28 background-color: red; | 28 background-color: red; |
| 29 background-image: -webkit-cross-fade(url(resources/blue-100.png), url(re
sources/green-100.png), 50%); | 29 background-image: -webkit-cross-fade(url(resources/blue-100.png), url(re
sources/green-100.png), 50%); |
| 30 } | 30 } |
| 31 @-webkit-keyframes anim { | 31 @keyframes anim { |
| 32 from { background-image: url(resources/blue-100.png); } | 32 from { background-image: url(resources/blue-100.png); } |
| 33 to { background-image: url(resources/green-100.png); } | 33 to { background-image: url(resources/green-100.png); } |
| 34 } | 34 } |
| 35 @-webkit-keyframes animShorthand { | 35 @keyframes animShorthand { |
| 36 from { background: url(resources/blue-100.png); } | 36 from { background: url(resources/blue-100.png); } |
| 37 to { background: url(resources/green-100.png); } | 37 to { background: url(resources/green-100.png); } |
| 38 } | 38 } |
| 39 </style> | 39 </style> |
| 40 <script src="resources/animation-test-helpers.js" type="text/javascript" chars
et="utf-8"></script> | 40 <script src="resources/animation-test-helpers.js" type="text/javascript" chars
et="utf-8"></script> |
| 41 <script type="text/javascript" charset="utf-8"> | 41 <script type="text/javascript" charset="utf-8"> |
| 42 const expectedValues = [ | 42 const expectedValues = [ |
| 43 // [time, element-id, property, expected-value, tolerance] | 43 // [time, element-id, property, expected-value, tolerance] |
| 44 [2.5, ["box", "boxStatic"], "backgroundImage", 0.5, 0.05], | 44 [2.5, ["box", "boxStatic"], "backgroundImage", 0.5, 0.05], |
| 45 [2.5, ["boxShorthand", "boxStatic"], "backgroundImage", 0.5, 0.05], | 45 [2.5, ["boxShorthand", "boxStatic"], "backgroundImage", 0.5, 0.05], |
| 46 ]; | 46 ]; |
| 47 | 47 |
| 48 var doPixelTest = true; | 48 var doPixelTest = true; |
| 49 var disablePauseAPI = false; | 49 var disablePauseAPI = false; |
| 50 runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixelTe
st); | 50 runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixelTe
st); |
| 51 </script> | 51 </script> |
| 52 </head> | 52 </head> |
| 53 <body> | 53 <body> |
| 54 <div id="box"></div> | 54 <div id="box"></div> |
| 55 <div id="boxStatic"></div> | 55 <div id="boxStatic"></div> |
| 56 <div id="boxShorthand"></div> | 56 <div id="boxShorthand"></div> |
| 57 <div id="result"></div> | 57 <div id="result"></div> |
| 58 </body> | 58 </body> |
| 59 </html> | 59 </html> |
| OLD | NEW |