OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
3 <style> | 3 <style> |
4 .parent { | 4 .parent { |
5 top: 30px; | 5 top: 30px; |
6 margin-bottom: 40px; | 6 margin-bottom: 40px; |
7 } | 7 } |
8 .target { | 8 .target { |
9 position: relative; | 9 position: relative; |
10 width: 10px; | 10 width: 10px; |
11 height: 10px; | 11 height: 10px; |
12 background-color: black; | 12 background-color: black; |
13 display: inline-block; | 13 display: inline-block; |
14 top: 10px; | 14 top: 10px; |
15 } | 15 } |
16 .expected { | 16 .expected { |
17 background-color: green; | 17 background-color: green; |
18 margin-right: 10px; | 18 margin-right: 10px; |
19 } | 19 } |
20 </style> | 20 </style> |
21 <body> | 21 <body> |
22 <script src="resources/interpolation-test.js"></script> | 22 <script src="resources/interpolation-test.js"></script> |
23 <script> | 23 <script> |
24 assertInterpolation({ | 24 assertInterpolation({ |
25 property: 'top', | 25 property: 'top', |
26 from: '', | 26 from: neutralKeyframe, |
27 to: '20px', | 27 to: '20px', |
28 }, [ | 28 }, [ |
29 {at: -0.3, is: '7px'}, | 29 {at: -0.3, is: '7px'}, |
30 {at: 0, is: '10px'}, | 30 {at: 0, is: '10px'}, |
31 {at: 0.5, is: '15px'}, | 31 {at: 0.5, is: '15px'}, |
32 {at: 1, is: '20px'}, | 32 {at: 1, is: '20px'}, |
33 {at: 1.5, is: '25px'}, | 33 {at: 1.5, is: '25px'}, |
34 ]); | 34 ]); |
35 | 35 |
36 assertNoInterpolation({ | 36 assertNoInterpolation({ |
(...skipping 26 matching lines...) Expand all Loading... |
63 to: '10px' | 63 to: '10px' |
64 }, [ | 64 }, [ |
65 {at: -0.3, is: '-16px'}, | 65 {at: -0.3, is: '-16px'}, |
66 {at: 0, is: '-10px'}, | 66 {at: 0, is: '-10px'}, |
67 {at: 0.5, is: '0px'}, | 67 {at: 0.5, is: '0px'}, |
68 {at: 1, is: '10px'}, | 68 {at: 1, is: '10px'}, |
69 {at: 1.5, is: '20px'} | 69 {at: 1.5, is: '20px'} |
70 ]); | 70 ]); |
71 </script> | 71 </script> |
72 </body> | 72 </body> |
OLD | NEW |