OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="UTF-8"> |
| 3 <style> |
| 4 .target { |
| 5 position: relative; |
| 6 width: 10px; |
| 7 height: 10px; |
| 8 background-color: black; |
| 9 } |
| 10 .expected { |
| 11 background-color: green; |
| 12 } |
| 13 </style> |
| 14 <body> |
| 15 <script src="../interpolation/resources/interpolation-test.js"></script> |
| 16 <script> |
| 17 assertComposition({ |
| 18 property: 'left', |
| 19 underlying: '50px', |
| 20 addFrom: '100px', |
| 21 addTo: '200px', |
| 22 }, [ |
| 23 {at: -0.3, is: '120px'}, |
| 24 {at: 0, is: '150px'}, |
| 25 {at: 0.5, is: '200px'}, |
| 26 {at: 1, is: '250px'}, |
| 27 {at: 1.5, is: '300px'}, |
| 28 ]); |
| 29 |
| 30 assertComposition({ |
| 31 property: 'left', |
| 32 underlying: '50px', |
| 33 addFrom: '100px', |
| 34 replaceTo: '200px', |
| 35 }, [ |
| 36 {at: -0.3, is: '135px'}, |
| 37 {at: 0, is: '150px'}, |
| 38 {at: 0.5, is: '175px'}, |
| 39 {at: 1, is: '200px'}, |
| 40 {at: 1.5, is: '225px'}, |
| 41 ]); |
| 42 |
| 43 assertComposition({ |
| 44 property: 'left', |
| 45 underlying: 'auto', |
| 46 addFrom: '100px', |
| 47 addTo: '200px', |
| 48 }, [ |
| 49 {at: -0.3, is: '70px'}, |
| 50 {at: 0, is: '100px'}, |
| 51 {at: 0.5, is: '150px'}, |
| 52 {at: 1, is: '200px'}, |
| 53 {at: 1.5, is: '250px'}, |
| 54 ]); |
| 55 </script> |
| 56 </body> |
OLD | NEW |