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 translate: 100px 200px 300px; | 5 translate: 100px 200px 300px; |
6 } | 6 } |
7 .target { | 7 .target { |
8 width: 100px; | 8 width: 100px; |
9 height: 100px; | 9 height: 100px; |
10 background-color: black; | 10 background-color: black; |
11 translate: 10px; | 11 translate: 10px; |
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: 'translate', | 25 property: 'translate', |
26 from: '', | 26 from: neutralKeyframe, |
27 to: '20px', | 27 to: '20px', |
28 }, [ | 28 }, [ |
29 {at: -1, is: '0px'}, | 29 {at: -1, is: '0px'}, |
30 {at: 0, is: '10px'}, | 30 {at: 0, is: '10px'}, |
31 {at: 0.25, is: '12.5px'}, | 31 {at: 0.25, is: '12.5px'}, |
32 {at: 0.75, is: '17.5px'}, | 32 {at: 0.75, is: '17.5px'}, |
33 {at: 1, is: '20px'}, | 33 {at: 1, is: '20px'}, |
34 {at: 2, is: '30px'}, | 34 {at: 2, is: '30px'}, |
35 ]); | 35 ]); |
36 | 36 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 to: 'initial', | 196 to: 'initial', |
197 }, [ | 197 }, [ |
198 {at: -1, is: '200px 400px 600px'}, | 198 {at: -1, is: '200px 400px 600px'}, |
199 {at: 0, is: '100px 200px 300px'}, | 199 {at: 0, is: '100px 200px 300px'}, |
200 {at: 0.25, is: '75px 150px 225px'}, | 200 {at: 0.25, is: '75px 150px 225px'}, |
201 {at: 0.75, is: '25px 50px 75px'}, | 201 {at: 0.75, is: '25px 50px 75px'}, |
202 {at: 1, is: '0px'}, | 202 {at: 1, is: '0px'}, |
203 {at: 2, is: '-100px -200px -300px'}, | 203 {at: 2, is: '-100px -200px -300px'}, |
204 ]); | 204 ]); |
205 </script> | 205 </script> |
OLD | NEW |