blob: 88d88e11eddb3f8b60d400b37c734280b4b03618 [file] [log] [blame]
simon.fraser@apple.com570ff4e2008-09-29 21:09:18 +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 of @import rule for importing keyframes</title>
8 <style type="text/css"> @import "resources/keyframes.css"; </style>
9 <style type="text/css" media="screen">
10 #box {
11 position: absolute;
12 left: 0;
13 top: 100px;
14 height: 100px;
15 width: 100px;
16 background-color: blue;
17 -webkit-animation-duration: 1s;
18 -webkit-animation-timing-function: linear;
19 -webkit-animation-name: "anim";
20 }
21 </style>
simon.fraser@apple.com93531132011-04-26 03:16:31 +000022 <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
simon.fraser@apple.com570ff4e2008-09-29 21:09:18 +000023 <script type="text/javascript" charset="utf-8">
simon.fraser@apple.com570ff4e2008-09-29 21:09:18 +000024
pol@apple.coma259bc12008-12-11 00:48:35 +000025 const expectedValues = [
26 // [animation-name, time, element-id, property, expected-value, tolerance]
27 ["anim", 0.3, "box", "left", 100, 1],
28 ["anim", 0.7, "box", "left", 200, 1],
29 ];
simon.fraser@apple.com570ff4e2008-09-29 21:09:18 +000030
pol@apple.coma259bc12008-12-11 00:48:35 +000031 runAnimationTest(expectedValues);
simon.fraser@apple.com570ff4e2008-09-29 21:09:18 +000032
33 </script>
34</head>
35<body>
36This test performs an animation of the left property. It should stop for 100ms at 100px and 200px
37We test for those values 50ms after it has stopped at each position. The keyframes are imported
38so this tests whether they come in correctly.
39<div id="box">
40</div>
41<div id="result">
42</div>
43</body>
44</html>