| -webkit-transition-property: -webkit-transform; |
| -webkit-transition-duration: 2s; |
| -webkit-transform: translate(0, 0); |
| testRunner.waitUntilDone(); |
| var t = window.getComputedStyle(document.getElementById('box')).webkitTransform; |
| // grab the x value from the matrix() |
| var lastValueRE = /([\.\d]+),[^,]+\)$/; |
| var xTranslate = lastValueRE.exec(t)[1]; |
| var result = (xTranslate > 0) ? 'PASS' : 'FAIL: transition should be re-targeted from 200px in x, so x > 0'; |
| document.getElementById('result').innerHTML = result; |
| var box = document.getElementById('box'); |
| box.style.webkitTransform = 'translate(200px, 0)'; |
| window.setTimeout(function() { |
| box.style.webkitTransform = 'translate(0, 200px)'; |
| window.setTimeout(test, 0); |
| <body onload="startTest()"> |
| <p>Interrupted transition should not jump back to pre-transition transform</p> |
| <div id="box" class="box"> |