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>Keyframes test with 'to' keyframe missing
</title>
8 <style type=
"text/css" media=
"screen">
15 background-color: blue;
16 -webkit-animation-duration:
1s;
17 -webkit-animation-timing-function: linear;
18 -webkit-animation-name:
"anim";
20 @-webkit-keyframes
"anim" {
28 <script type=
"text/javascript" charset=
"utf-8">
29 if (window.layoutTestController) {
30 layoutTestController.dumpAsText();
31 layoutTestController.waitUntilDone();
35 const defaultTolerance =
0.2;
37 function isEqual(actual, desired, tolerance)
39 if (tolerance == undefined || tolerance ==
0)
40 tolerance = defaultTolerance;
41 var diff = Math.abs(actual - desired);
42 return diff < tolerance;
45 function snapshot(which)
50 var left = parseInt(window.getComputedStyle(document.getElementById('box')).left);
52 if (!isEqual(left, expected))
53 result =
"FAIL(was:"+left+
", expected:"+expected+
")";
58 setTimeout(
"snapshot(0)",
300);
59 setTimeout(
"snapshot(1)",
700);
61 window.setTimeout(function() {
62 document.getElementById('result').innerHTML = result;
63 if (window.layoutTestController)
64 layoutTestController.notifyDone();
68 window.addEventListener('load', start, false);
73 This test performs an animation of the left property. The 'to' keyframe is missing so it should not animate