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 scale: 0.5 1 2 | 5 scale: 0.5 1 2 |
6 } | 6 } |
7 .target { | 7 .target { |
8 width: 10px; | 8 width: 10px; |
9 height: 10px; | 9 height: 10px; |
10 background-color: black; | 10 background-color: black; |
11 scale: 1.1; | 11 scale: 1.1; |
12 } | 12 } |
13 .expected { | 13 .expected { |
14 background-color: green; | 14 background-color: green; |
15 } | 15 } |
16 </style> | 16 </style> |
17 <template id="target-template"> | 17 <template id="target-template"> |
18 <div class="parent"> | 18 <div class="parent"> |
19 <div class="target"></div> | 19 <div class="target"></div> |
20 </div> | 20 </div> |
21 </template> | 21 </template> |
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: 'scale', | 25 property: 'scale', |
26 from: neutralKeyframe, | 26 from: neutralKeyframe, |
27 to: '1.5', | 27 to: '1.5', |
28 }, [ | 28 }, [ |
29 {at: -1, is: '0.7 0.7'}, | 29 {at: -1, is: '0.7'}, |
30 {at: 0, is: '1.1 1.1'}, | 30 {at: 0, is: '1.1'}, |
31 {at: 0.25, is: '1.2 1.2'}, | 31 {at: 0.25, is: '1.2'}, |
32 {at: 0.75, is: '1.4 1.4'}, | 32 {at: 0.75, is: '1.4'}, |
33 {at: 1, is: '1.5 1.5'}, | 33 {at: 1, is: '1.5'}, |
34 {at: 2, is: '1.9 1.9'}, | 34 {at: 2, is: '1.9'}, |
35 ]); | 35 ]); |
36 | 36 |
37 assertInterpolation({ | 37 assertInterpolation({ |
38 property: 'scale', | 38 property: 'scale', |
39 from: 'unset', | 39 from: 'unset', |
40 to: '1.5', | 40 to: '1.5', |
41 }, [ | 41 }, [ |
42 {at: -1, is: '0.5 0.5'}, | 42 {at: -1, is: '0.5'}, |
43 {at: 0, is: '1'}, | 43 {at: 0, is: '1'}, |
44 {at: 0.25, is: '1.125 1.125'}, | 44 {at: 0.25, is: '1.125'}, |
45 {at: 0.75, is: '1.375 1.375'}, | 45 {at: 0.75, is: '1.375'}, |
46 {at: 1, is: '1.5 1.5'}, | 46 {at: 1, is: '1.5'}, |
47 {at: 2, is: '2 2'}, | 47 {at: 2, is: '2'}, |
48 ]); | 48 ]); |
49 | 49 |
50 assertInterpolation({ | 50 assertInterpolation({ |
51 property: 'scale', | 51 property: 'scale', |
52 from: '-10', | 52 from: '-10', |
53 to: '10', | 53 to: '10', |
54 }, [ | 54 }, [ |
55 {at: -1, is: '-30'}, | 55 {at: -1, is: '-30'}, |
56 {at: 0, is: '-10'}, | 56 {at: 0, is: '-10'}, |
57 {at: 0.25, is: '-5'}, | 57 {at: 0.25, is: '-5'}, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 to: 'initial', | 183 to: 'initial', |
184 }, [ | 184 }, [ |
185 {at: -1, is: '0 1 3'}, | 185 {at: -1, is: '0 1 3'}, |
186 {at: 0, is: '0.5 1 2'}, | 186 {at: 0, is: '0.5 1 2'}, |
187 {at: 0.25, is: '0.625 1 1.75'}, | 187 {at: 0.25, is: '0.625 1 1.75'}, |
188 {at: 0.75, is: '0.875 1 1.25'}, | 188 {at: 0.75, is: '0.875 1 1.25'}, |
189 {at: 1, is: '1 1 1'}, | 189 {at: 1, is: '1 1 1'}, |
190 {at: 2, is: '1.5 1 0'}, | 190 {at: 2, is: '1.5 1 0'}, |
191 ]); | 191 ]); |
192 </script> | 192 </script> |
OLD | NEW |