1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
7 <title>Test animation with multiple concurrent animations
</title>
8 <style type=
"text/css" media=
"screen">
15 background-color: blue;
16 -webkit-animation-duration:
2s;
17 -webkit-animation-timing-function: linear;
18 -webkit-animation-name: anim1;
20 @-webkit-keyframes anim1 {
32 background-color: blue;
33 -webkit-animation-duration:
2s;
34 -webkit-animation-timing-function: linear;
35 -webkit-animation-name: anim2;
37 @-webkit-keyframes anim2 {
43 <script src=
"animation-test-helpers.js" type=
"text/javascript" charset=
"utf-8"></script>
44 <script type=
"text/javascript" charset=
"utf-8">
46 const defaultTolerance =
2;
49 // [time, property, element-id, expected-value]
50 [
400,
"left",
"box1",
20],
51 [
500,
"left",
"box2",
20],
52 [
1000,
"left",
"box2",
30],
53 [
1200,
"left",
"box1",
10],
54 [
1500,
"left",
"box2",
25],
55 [
1600,
"left",
"box1",
15],
65 window.setTimeout(function() {
66 document.getElementById('box1').style.display =
"none";
67 document.getElementById('box2').style.display =
"none";
72 document.addEventListener('webkitAnimationStart', start, false);
77 This test performs animations of the left property on two boxes over
2 seconds.
78 It takes
3 snapshots each and expects each result to be within a specified range.