blob: a747ff1694b7c603f006a7aa81c579bafeebaeed [file] [log] [blame]
simon.fraser@apple.com1a6be832010-09-25 02:52:10 +00001<!DOCTYPE html>
2<html>
3<head>
4 <style type="text/css" media="screen">
5 #box {
6 position: absolute;
7 left: 0;
8 top: 0;
9 height: 100px;
10 width: 100px;
11 background-color: green;
12 -webkit-animation-name: move;
13 -webkit-animation-duration: 1s;
14 -webkit-animation-timing-function: linear;
15 -webkit-animation-iteration-count: 1;
16 }
17
18 @-webkit-keyframes move {
19 from {
20 -webkit-transform: translateX(0) scale(1);
mihaip@chromium.orgb5ae3862010-09-29 01:37:41 +000021 opacity: 0.7;
simon.fraser@apple.com1a6be832010-09-25 02:52:10 +000022 }
23 to {
24 -webkit-transform: translateX(400px) scale(1);
mihaip@chromium.orgb5ae3862010-09-29 01:37:41 +000025 opacity: 1.0;
simon.fraser@apple.com1a6be832010-09-25 02:52:10 +000026 }
27 }
28
29 #indicator {
30 position: absolute;
31 left: 0;
32 top: 0;
33 height: 100px;
34 width: 100px;
35 left: 200px;
36 background-color: red;
37 }
38
39 #result {
40 display: none; /* only the pixel output is valuable */
41 }
42 </style>
simon.fraser@apple.com93531132011-04-26 03:16:31 +000043 <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
simon.fraser@apple.com1a6be832010-09-25 02:52:10 +000044 <script type="text/javascript" charset="utf-8">
45
46 const expectedValues = [
47 // [animation-name, time, element-id, property, expected-value, tolerance]
48 ["move", 0.5, "box", "webkitTransform.4", 200, 2],
49 ];
50
51 var disablePauseAnimationAPI = false;
52 var doPixelTest = true;
53 runAnimationTest(expectedValues, null, null, disablePauseAnimationAPI, doPixelTest);
54
55 </script>
56</head>
57<body>
58
59<!-- In the pixel results, the green square should overlay the red square -->
60<div id="indicator"></div>
61<div id="box"></div>
62<div id="result"></div>
63
64</body>
65</html>