10 border:
1px solid black;
17 background-color: blue;
18 -webkit-transition-duration:
1s;
19 -webkit-transition-timing-function: linear;
23 if (window
.testRunner
) {
24 testRunner
.dumpAsText();
25 testRunner
.waitUntilDone();
30 function startTransition()
32 var box
= document
.getElementById('box');
34 box
.style
.left
= '300px';
35 box
.offsetTop
; // force transition start
37 box
.style
.left
= '0px'
38 box
.offsetTop
; // force transition interruption
40 // Force at least one timing update and recalc after the interruption.
41 id
= requestAnimationFrame(function() {
42 cancelAnimationFrame(id
);
43 var current
= document
.timeline
.getAnimations().length
;
44 document
.getElementById('result').innerHTML
= (current
== 0) ? "PASS" : "FAIL";
45 if (window
.testRunner
)
46 testRunner
.notifyDone();
49 window
.addEventListener('load', startTransition
, false)
54 <p>Box should stay left as style is reset immediately
</p>