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 keyframes
</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: anim;
20 @-webkit-keyframes anim {
27 <script src=
"animation-test-helpers.js" type=
"text/javascript" charset=
"utf-8"></script>
28 <script type=
"text/javascript" charset=
"utf-8">
30 const defaultTolerance =
2;
33 // [time, property, element-id, expected-value]
34 [
400,
"left",
"box",
20],
35 [
1200,
"left",
"box",
10],
36 [
1600,
"left",
"box",
15],
42 window.setTimeout(function() {
43 document.getElementById('box').style.display =
"none";
48 document.addEventListener('webkitAnimationStart', start, false);
53 This test performs a keyframed animation of the left property. It animates over
2 seconds.
54 It takes
3 snapshots and expects each result to be within a specified range.