6 -webkit-transform: translateZ(0px);
7 -webkit-perspective: 400;
15 background-color: green;
23 background-color: red;
24 -webkit-transform: translateZ(10px);
25 -webkit-transform-style: preserve-3d;
26 -webkit-animation-duration: 100ms;
27 -webkit-animation-fill-mode: both;
28 -webkit-animation-timing-function: linear;
29 -webkit-animation-iteration-count: 1;
32 @-webkit-keyframes anim {
33 from { -webkit-transform: translateZ(0px) translateX(0px); }
34 to { -webkit-transform: translateZ(200px) translateX(-200px); }
38 <script src="resources/animation-test-helpers.js"></script>
40 if (window.layoutTestController) {
41 layoutTestController.dumpAsText();
42 layoutTestController.waitUntilDone();
45 function animationDone()
47 var animated = document.getElementById('animated');
49 var expected = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -200, 0, 200, 1];
50 var computed = getPropertyValue("webkitTransform", "animated");
51 if (comparePropertyValue("webkitTransform", computed, expected, 0.002)) {
52 result = "PASS - Computed final position is correct.";
54 result = "FAIL - Computed final position is incorrect. Expected " + expected + ", got " + computed;
56 document.getElementById('result').innerHTML = result;
57 layoutTestController.notifyDone();
60 function animationStarted()
62 var animated = document.getElementById('animated');
63 animated.style.webkitTransformStyle = 'flat';
68 var animated = document.getElementById('animated');
69 animated.style.webkitAnimationName = "anim";
70 animated.addEventListener('webkitAnimationEnd', animationDone);
71 waitForAnimationToStart(animated, animationStarted);
75 <body onload="startTest()">
76 <!-- Test for DRT pauseAnimationAtTimeOnElementWithId() API on animations with multiple keyframes -->
78 <div id="revealed"></div>
79 <div id="animated"></div>
81 <div id="result"></div>