| <!DOCTYPE> |
| |
| <html> |
| <head> |
| <style> |
| .box { |
| height: 200px; |
| width: 200px; |
| margin: 10px; |
| -webkit-transition-duration: 1s; |
| -webkit-transition-timing-function: linear; |
| } |
| |
| #box { |
| background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'); |
| -webkit-transition-property: background-image; |
| } |
| |
| #box.final { |
| background-image: url('../fast/backgrounds/repeat/resources/nav.blue.gif'); |
| } |
| |
| #boxShorthand { |
| background: url('../fast/backgrounds/repeat/resources/gradient.gif'); |
| -webkit-transition-property: background; |
| } |
| |
| #boxShorthand.final { |
| background: url('../fast/backgrounds/repeat/resources/nav.blue.gif'); |
| } |
| |
| #boxStatic { |
| background-image: -webkit-cross-fade(url('../fast/backgrounds/repeat/resources/gradient.gif'), |
| url('../fast/backgrounds/repeat/resources/nav.blue.gif'), 0.5); |
| } |
| |
| </style> |
| <script src="../animations/resources/animation-test-helpers.js" type="text/javascript"></script> |
| <script> |
| |
| const expectedValues = [ |
| // [time, element-id, property, expected-value, tolerance] |
| [0.5, ['box', 'boxStatic'], 'background-image', null, 0.05], |
| [0.5, ['boxShorthand', 'boxStatic'], 'background-image', null, 0.05], |
| ]; |
| |
| function setupTest() |
| { |
| document.getElementById('box').className = 'box final'; |
| document.getElementById('boxShorthand').className = 'box final'; |
| } |
| |
| runTransitionTest(expectedValues, setupTest); |
| </script> |
| </head> |
| <body> |
| <div id="box" class="box"></div> |
| <div id="boxShorthand" class="box"></div> |
| <div id="boxStatic" class="box"></div> |
| |
| <div id="result"></div> |
| </body> |
| </html> |