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