5 <style type=
"text/css" media=
"screen">
10 background-color: blue;
11 transform: translate3d(
0,
0,
0);
14 #movers.moved
> .box {
15 -webkit-animation: move
1s
1s linear; /* Note
1 sec delay */
18 /* Test that we fetch the current style, not the one snapshotted when the animation started */
19 #movers.moved
> #changedbox {
20 transform: translate3d(
50px,
0,
0);
23 /* Test that fill-mode: backwards works */
24 #movers.moved
> #filledbox {
25 -webkit-animation: move
1s
1s linear backwards;
28 @-webkit-keyframes move {
29 from { transform: translateX(
100px); }
30 to { transform: translateX(
400px); }
33 <script type=
"text/javascript" charset=
"utf-8">
34 if (window.testRunner) {
35 testRunner.dumpAsText();
36 testRunner.waitUntilDone();
40 function check(message, expected, actual) {
41 if (expected == actual) {
42 results.push('PASS - ' + message);
44 results.push('FAIL - ' + actual);
49 document.getElementById('movers').className = 'moved';
50 document.body.offsetTop;
51 check('default', 'matrix(
1,
0,
0,
1,
0,
0)', getComputedStyle(document.querySelector('#testbox')).webkitTransform);
52 check('changed style', 'matrix(
1,
0,
0,
1,
50,
0)', getComputedStyle(document.querySelector('#changedbox')).webkitTransform);
53 check('backwards fill', 'matrix(
1,
0,
0,
1,
100,
0)', getComputedStyle(document.querySelector('#filledbox')).webkitTransform);
54 document.body.innerHTML = results.join('
<br>');
55 if (window.testRunner)
56 testRunner.notifyDone();
62 <p>Test computed style during the delay phase of an accelerated animation.
</p>
64 <div id=
"testbox" class=
"box"></div>
65 <div id=
"changedbox" class=
"box"></div>
66 <div id=
"filledbox" class=
"box"></div>