blob: 1b376a2828a8b2eca10bc27ed9d3453653b3415b [file] [log] [blame]
cmarrin@apple.com89a55e92009-01-07 00:35:51 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3
4<html lang="en">
5<head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <title>Test simultaneous starting of two animations</title>
8 <style type="text/css" media="screen">
9 .box {
10 position: relative;
11 left: 100px;
12 height: 100px;
13 width: 100px;
14 background-color: blue;
15 -webkit-animation-duration: 10s;
16 -webkit-animation-timing-function: linear;
17 -webkit-animation-name: "anim";
18 }
19 @-webkit-keyframes "anim" {
20 from { left: 10px; }
21 to { left: 810px; }
22 }
23 #box1 {
24 top: 10px;
25 background-color: blue;
26 }
27 #box2 {
28 top: 10px;
29 background-color: red;
30 }
31 </style>
simon.fraser@apple.com93531132011-04-26 03:16:31 +000032 <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
cmarrin@apple.com89a55e92009-01-07 00:35:51 +000033 <script type="text/javascript" charset="utf-8">
34
35 const expectedValues = [
36 // [animation-name, time, element-id, property, expected-value, tolerance]
37 ["anim", 2, "box1", "left", 170, 5],
38 ["anim", 2, "box2", "left", 170, 5],
39 ["anim", 2, ["box1", "box2"], "left", "", 0],
40 ["anim", 5, "box1", "left", 410, 5],
41 ["anim", 5, "box2", "left", 410, 5],
42 ["anim", 5, ["box1", "box2"], "left", "", 0],
43 ["anim", 8, "box1", "left", 650, 5],
44 ["anim", 8, "box2", "left", 650, 5],
45 ["anim", 8, ["box1", "box2"], "left", "", 0],
46 ];
47
48 runAnimationTest(expectedValues);
49
50 </script>
51</head>
52<body>
53This test performs an animation of the left property. It animates over 10 seconds.
54It takes 3 snapshots and expects each result to be within a specified range.
55<div id="box1" class="box">
56</div>
57<div id="box2" class="box">
58</div>
59<div id="result">
60</div>
61</body>
62</html>