| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <meta charset="UTF-8"> | |
| 3 <style> | |
| 4 .target { | |
| 5 height: 10px; | |
| 6 background: black; | |
| 7 } | |
| 8 .filler { | |
| 9 height: 10px; | |
| 10 -webkit-flex: 1 1 50%; | |
| 11 flex: 1 1 50%; | |
| 12 } | |
| 13 .expected { | |
| 14 background: green; | |
| 15 } | |
| 16 .container { | |
| 17 display: -webkit-flex; | |
| 18 display: flex; | |
| 19 } | |
| 20 </style> | |
| 21 <body> | |
| 22 <template id="target-template"><div class="container"> | |
| 23 <div class="target"></div> | |
| 24 <div class="filler"></div> | |
| 25 </div></template> | |
| 26 <script src="resources/interpolation-test.js"></script> | |
| 27 <script> | |
| 28 assertInterpolation({ | |
| 29 property: '-webkit-flex', | |
| 30 from: '1 1 0%', | |
| 31 to: '2 2 100%' | |
| 32 }, [ | |
| 33 {at: -5, is: '0 0 0%'}, | |
| 34 {at: -0.3, is: '0.7 0.7 0%'}, | |
| 35 {at: 0, is: '1 1 0%'}, | |
| 36 {at: 0.3, is: '1.3 1.3 30%'}, | |
| 37 {at: 0.6, is: '1.6 1.6 60%'}, | |
| 38 {at: 1, is: '2 2 100%'}, | |
| 39 {at: 1.5, is: '2.5 2.5 150%'} | |
| 40 ]); | |
| 41 assertNoInterpolation({ | |
| 42 property: '-webkit-flex', | |
| 43 from: '0 0 100%', | |
| 44 to: '1 1 100%' | |
| 45 }); | |
| 46 assertInterpolation({ | |
| 47 property: 'flex-basis', | |
| 48 from: '0px', | |
| 49 to: '100px' | |
| 50 }, [ | |
| 51 {at: -0.3, is: '0px'}, | |
| 52 {at: 0, is: '0px'}, | |
| 53 {at: 0.4, is: '40px'}, | |
| 54 {at: 0.6, is: '60px'}, | |
| 55 {at: 1, is: '100px'}, | |
| 56 {at: 1.5, is: '150px'} | |
| 57 ]); | |
| 58 assertInterpolation({ | |
| 59 property: 'flex-basis', | |
| 60 from: '0%', | |
| 61 to: '100%' | |
| 62 }, [ | |
| 63 {at: -0.3, is: '0%'}, | |
| 64 {at: 0, is: '0%'}, | |
| 65 {at: 0.4, is: '40%'}, | |
| 66 {at: 0.6, is: '60%'}, | |
| 67 {at: 1, is: '100%'}, | |
| 68 {at: 1.5, is: '150%'} | |
| 69 ]); | |
| 70 </script> | |
| 71 </body> | |
| OLD | NEW |