10 font-family: ArialRoundedMTBold, sans-serif;
16 background-color: #933;
26 -webkit-transition-property: left;
27 -webkit-transition-duration: 0.5s;
28 -webkit-transition-timing-function: linear;
34 -webkit-transform: translate(400px, 0px);
35 -webkit-transition-property: -webkit-transform;
36 -webkit-transition-duration: 0.5s;
37 -webkit-transition-timing-function: linear;
41 if (window.testRunner) {
42 testRunner.dumpAsText();
43 testRunner.waitUntilDone();
46 result = "<span style='color:red'>CHECK NOT COMPLETED</span>";
48 function isEqual(actual, desired, tolerance)
50 var diff = Math.abs(actual - desired);
51 return diff < tolerance;
54 function cancelTransition()
56 document.getElementById("container").className = "";
59 function restartTransition()
61 document.getElementById("container").className = "run";
62 // The transition should restart at the beginning here. After 250 it should be halfway done.
63 setTimeout("check()", 250);
68 var left = parseFloat(window.getComputedStyle(document.getElementById('a')).left);
70 if (!isEqual(left, 250, 50))
71 result += "<span style='color:red'>FAIL(was:" + left + ", s/b:150)</span>";
73 result += "<span style='color:green'>PASS</span>";
75 result += ", webkitTransform:";
77 var transform = window.getComputedStyle(document.getElementById('b')).webkitTransform;
78 transform = transform.split("(");
79 transform = transform[1].split(",");
80 if (!isEqual(transform[4], 200, 50))
81 result += "<span style='color:red'>FAIL(was:" + transform[4] + ", s/b:50)</span>";
83 result += "<span style='color:green'>PASS</span>";
85 document.getElementById('result').innerHTML = result;
86 if (window.testRunner)
87 testRunner.notifyDone();
92 document.getElementById("container").className = "run";
93 setTimeout("cancelTransition()", 100);
94 setTimeout("restartTransition()", 200);
98 <body onload="start()">
100 Test removes the transition properties while the transition is running, then adds them back in.
101 If working properly the transitions should start from the beginning. But there was a bug that
102 would cause the transition to continue to run (although with no visible effect). So when you
103 restarted, it would pick up where it left off.
106 <div id="a" class="tester">left</div>
107 <div id="b" class="tester">translate</div>