3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4 <title>Test of -webkit-animation-play-state</title>
5 <style type="text/css" media="screen">
16 background-color: red;
18 -webkit-animation-duration: 2s;
19 -webkit-animation-direction: normal;
20 -webkit-animation-iteration-count: 2;
21 -webkit-animation-timing-function: linear;
22 -webkit-animation-name: "move1";
30 background-color: green;
32 @-webkit-keyframes "move1" {
33 from { -webkit-transform: translateX(0px); }
34 to { -webkit-transform: translateX(200px); }
37 color: white; /* hide from pixel results */
40 <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
41 <script type="text/javascript" charset="utf-8">
42 const expectedValues = [
43 // [animation-name, time, element-id, property, expected-value, tolerance]
44 ["move1", 0.5, "box", "webkitTransform", [1,0,0,1, 50,0], 20],
45 ["move1", 1.0, "box", "webkitTransform", [1,0,0,1,100,0], 20],
46 ["move1", 2.5, "box", "webkitTransform", [1,0,0,1, 50,0], 20],
49 function pauseAnimation()
51 document.getElementById("box").style.webkitAnimationPlayState = "paused";
56 setTimeout(pauseAnimation, 2500);
59 runAnimationTest(expectedValues, setTimers, null, true);
64 <!-- This tests the operation of -webkit-animation-play-state. After 1 second the red boxes should be hidden by the green boxes. You should see no red boxes. -->
66 <div id="safezone"></div>
67 <div id="result"></div>