| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
| 3 <style> | 3 <style> |
| 4 .target { | 4 .target { |
| 5 width: 60px; | 5 width: 60px; |
| 6 height: 60px; | 6 height: 60px; |
| 7 display: inline-block; | 7 display: inline-block; |
| 8 border: 2px solid black; | 8 border: 2px solid black; |
| 9 margin-right: 2px; | 9 margin-right: 2px; |
| 10 background-color: red; |
| 10 } | 11 } |
| 11 .replica { | 12 .replica { |
| 12 background-color: green; | 13 background-color: green; |
| 13 margin-right: 15px; | 14 margin-right: 15px; |
| 14 } | 15 } |
| 15 </style> | 16 </style> |
| 16 <body> | 17 <body> |
| 17 <script src="resources/interpolation-test.js"></script> | 18 <script src="resources/interpolation-test.js"></script> |
| 18 <script> | 19 <script> |
| 19 assertInterpolation({ | 20 assertInterpolation({ |
| 20 property: 'background-color', | 21 property: 'background-color', |
| 21 from: 'white', | 22 from: 'unset', |
| 22 to: 'orange' | |
| 23 }, [ | |
| 24 {at: -0.3, is: 'white'}, | |
| 25 {at: 0, is: 'white'}, | |
| 26 {at: 0.3, is: 'rgb(255, 228, 179)'}, | |
| 27 {at: 0.6, is: 'rgb(255, 201, 102)'}, | |
| 28 {at: 1, is: 'orange'}, | |
| 29 {at: 1.5, is: 'rgb(255, 120, 0)'}, | |
| 30 ]); | |
| 31 assertInterpolation({ | |
| 32 property: 'background-color', | |
| 33 from: 'initial', | |
| 34 to: 'transparent' | 23 to: 'transparent' |
| 35 }, [ | 24 }, [ |
| 36 {at: -0.3, is: 'transparent'}, | 25 {at: -0.3, is: 'transparent'}, |
| 37 {at: 0, is: 'transparent'}, | 26 {at: 0, is: 'transparent'}, |
| 38 {at: 0.3, is: 'transparent'}, | 27 {at: 0.3, is: 'transparent'}, |
| 39 {at: 0.6, is: 'transparent'}, | 28 {at: 0.6, is: 'transparent'}, |
| 40 {at: 1, is: 'transparent'}, | 29 {at: 1, is: 'transparent'}, |
| 41 {at: 1.5, is: 'transparent'}, | 30 {at: 1.5, is: 'transparent'}, |
| 42 ]); | 31 ]); |
| 43 </script> | 32 </script> |
| 44 </body> | 33 </body> |
| OLD | NEW |