2010-12-07 Simon Fraser <simon.fraser@apple.com>
[WebKit-https.git] / LayoutTests / transitions / zero-duration-in-list.html
1 <!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>Handle 0 duration in a multiple value list</title>
8   <style type="text/css" media="screen">
9     #box {
10       position: absolute;
11       height: 100px;
12       width: 100px;
13       background-color: blue;
14       -webkit-transition-duration: 0, 0.5s;
15       -webkit-transition-timing-function: linear;
16       -webkit-transition-property: top, left;
17     }
18   </style>
19   <script src="transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
20   <script type="text/javascript" charset="utf-8">
21     
22     const expectedValues = [
23       // [time, element-id, property, expected-value, tolerance, post-completion callback, should-be-transitioning]
24       [0.25, "box", "left", 50, 10, null, shouldBeTransitioning],
25       [0.25, "box", "top", 100, 10, null, shouldNotBeTransitioning],
26     ];
27     
28     function setupTest()
29     {
30       var box = document.getElementById('box');
31       box.style.top = '100px';
32       box.style.left = '100px';
33     }
34     
35     runTransitionTest(expectedValues, setupTest, usePauseAPI);
36   </script>
37 </head>
38 <body>
39
40 <p>Tests that with a zero duration transition on top, it does not animate</p>
41 <div id="box">
42 </div>
43 <div id="result">
44 </div>
45 </body>
46 </html>