| <!DOCTYPE><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false ] --> |
| |
| <html> |
| <head> |
| <style> |
| .box { |
| height: 100px; |
| width: 100px; |
| margin: 10px; |
| border: 1px solid black; |
| background-repeat: no-repeat; |
| -webkit-transition-duration: 1s; |
| -webkit-transition-timing-function: linear; |
| -webkit-transition-property: background-position; |
| } |
| |
| #box { |
| background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'), url('../fast/backgrounds/repeat/resources/gradient.gif'); |
| background-position: 0 0, 0 80px; |
| } |
| |
| #box.final { |
| background-position: 80px 80px, 80px 0; |
| } |
| |
| /* Mismatched layers */ |
| #box2 { |
| background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'), url('../fast/backgrounds/repeat/resources/gradient.gif'); |
| background-position: 0 0, 0 80px; |
| } |
| |
| #box2.final { |
| background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'); |
| background-position: 80px 80px; |
| } |
| |
| #box3 { |
| background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'); |
| background-position: 80px 80px; |
| } |
| |
| #box3.final { |
| background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'), url('../fast/backgrounds/repeat/resources/gradient.gif'); |
| background-position: 0 0, 0 80px; |
| } |
| |
| </style> |
| <script src="resources/transition-test-helpers.js"></script> |
| <script type="text/javascript"> |
| |
| const expectedValues = [ |
| // [time, element-id, property, expected-value, tolerance] |
| [0.5, 'box', 'background-position', [40, 40], 2], |
| [0.5, 'box2', 'background-position', [40, 40], 2], |
| [0.5, 'box3', 'background-position', [40, 40], 2], |
| ]; |
| |
| function setupTest() |
| { |
| document.getElementById('box').className = 'box final'; |
| document.getElementById('box2').className = 'box final'; |
| document.getElementById('box3').className = 'box final'; |
| } |
| |
| runTransitionTest(expectedValues, setupTest, usePauseAPI); |
| </script> |
| </head> |
| <body> |
| |
| <div id="box" class="box"></div> |
| <div id="box2" class="box"></div> |
| <div id="box3" class="box"></div> |
| |
| <div id="result"> |
| </div> |
| |
| </body> |
| </html> |