| 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 } | 12 } |
| 12 .expected { | 13 .expected { |
| 13 background-color: green; | 14 background-color: green; |
| 14 } | 15 } |
| 15 </style> | 16 </style> |
| 16 <template id="target-template"> | 17 <template id="target-template"> |
| 17 <div class="parent"> | 18 <div class="parent"> |
| 18 <div class="target"></div> | 19 <div class="target"></div> |
| 19 </div> | 20 </div> |
| 20 </template> | 21 </template> |
| 21 <script src="resources/interpolation-test.js"></script> | 22 <script src="resources/interpolation-test.js"></script> |
| 22 <script> | 23 <script> |
| 23 assertInterpolation({ | 24 assertInterpolation({ |
| 24 property: 'translate', | 25 property: 'translate', |
| 26 from: '', |
| 27 to: '20px', |
| 28 }, [ |
| 29 {at: -1, is: '0px'}, |
| 30 {at: 0, is: '10px'}, |
| 31 {at: 0.25, is: '12.5px'}, |
| 32 {at: 0.75, is: '17.5px'}, |
| 33 {at: 1, is: '20px'}, |
| 34 {at: 2, is: '30px'}, |
| 35 ]); |
| 36 |
| 37 assertInterpolation({ |
| 38 property: 'translate', |
| 39 from: 'unset', |
| 40 to: '20px', |
| 41 }, [ |
| 42 {at: -1, is: '-20px'}, |
| 43 {at: 0, is: '0px'}, |
| 44 {at: 0.25, is: '5px'}, |
| 45 {at: 0.75, is: '15px'}, |
| 46 {at: 1, is: '20px'}, |
| 47 {at: 2, is: '40px'}, |
| 48 ]); |
| 49 |
| 50 assertInterpolation({ |
| 51 property: 'translate', |
| 25 from: '-100px', | 52 from: '-100px', |
| 26 to: '100px', | 53 to: '100px', |
| 27 }, [ | 54 }, [ |
| 28 {at: -1, is: '-300px'}, | 55 {at: -1, is: '-300px'}, |
| 29 {at: 0, is: '-100px'}, | 56 {at: 0, is: '-100px'}, |
| 30 {at: 0.25, is: '-50px'}, | 57 {at: 0.25, is: '-50px'}, |
| 31 {at: 0.75, is: '50px'}, | 58 {at: 0.75, is: '50px'}, |
| 32 {at: 1, is: '100px'}, | 59 {at: 1, is: '100px'}, |
| 33 {at: 2, is: '300px'}, | 60 {at: 2, is: '300px'}, |
| 34 ]); | 61 ]); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 to: 'initial', | 196 to: 'initial', |
| 170 }, [ | 197 }, [ |
| 171 {at: -1, is: '200px 400px 600px'}, | 198 {at: -1, is: '200px 400px 600px'}, |
| 172 {at: 0, is: '100px 200px 300px'}, | 199 {at: 0, is: '100px 200px 300px'}, |
| 173 {at: 0.25, is: '75px 150px 225px'}, | 200 {at: 0.25, is: '75px 150px 225px'}, |
| 174 {at: 0.75, is: '25px 50px 75px'}, | 201 {at: 0.75, is: '25px 50px 75px'}, |
| 175 {at: 1, is: '0px'}, | 202 {at: 1, is: '0px'}, |
| 176 {at: 2, is: '-100px -200px -300px'}, | 203 {at: 2, is: '-100px -200px -300px'}, |
| 177 ]); | 204 ]); |
| 178 </script> | 205 </script> |
| OLD | NEW |