| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
| 3 <style> | 3 <style> |
| 4 .parent { |
| 5 background-image: url(../resources/blue-100.png); |
| 6 background-size: 0 0; |
| 7 } |
| 4 .target { | 8 .target { |
| 5 width: 100px; | 9 width: 100px; |
| 6 height: 100px; | 10 height: 100px; |
| 7 display: inline-block; | 11 display: inline-block; |
| 8 border: 10px solid black; | 12 border: 10px solid black; |
| 9 background-repeat: no-repeat; | 13 background-repeat: no-repeat; |
| 14 background-image: url(../resources/blue-100.png); |
| 10 } | 15 } |
| 11 .expected { | 16 .expected { |
| 12 border-color: green; | 17 border-color: green; |
| 13 margin-right: 2px; | 18 margin-right: 2px; |
| 14 } | 19 } |
| 15 </style> | 20 </style> |
| 16 <body> | 21 <body> |
| 17 <script src="resources/interpolation-test.js"></script> | 22 <script src="resources/interpolation-test.js"></script> |
| 18 <script> | 23 <script> |
| 19 // Image to image | 24 // Neutral to image |
| 20 var from = 'url(../resources/blue-100.png)'; | 25 var from = 'url(../resources/blue-100.png)'; |
| 21 var to = 'url(../resources/green-100.png)'; | 26 var to = 'url(../resources/green-100.png)'; |
| 22 assertInterpolation({ | 27 assertInterpolation({ |
| 23 property: 'background-image', | 28 property: 'background-image', |
| 29 from: '', |
| 30 to: to, |
| 31 }, [ |
| 32 {at: -0.3, is: from}, |
| 33 {at: 0, is: from}, |
| 34 {at: 0.3, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.3)'}, |
| 35 {at: 0.6, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.6)'}, |
| 36 {at: 1, is: to}, |
| 37 {at: 1.5, is: to}, |
| 38 ]); |
| 39 |
| 40 // initial to image |
| 41 to = 'url(../resources/green-100.png)'; |
| 42 assertNoInterpolation({ |
| 43 property: 'background-image', |
| 44 from: 'initial', |
| 45 to: to, |
| 46 }); |
| 47 |
| 48 // inherit to image |
| 49 from = 'url(../resources/blue-100.png)'; |
| 50 to = 'url(../resources/green-100.png)'; |
| 51 assertInterpolation({ |
| 52 property: 'background-image', |
| 53 from: 'inherit', |
| 54 to: to, |
| 55 }, [ |
| 56 {at: -0.3, is: from}, |
| 57 {at: 0, is: from}, |
| 58 {at: 0.3, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.3)'}, |
| 59 {at: 0.6, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.6)'}, |
| 60 {at: 1, is: to}, |
| 61 {at: 1.5, is: to}, |
| 62 ]); |
| 63 |
| 64 // unset to image |
| 65 assertNoInterpolation({ |
| 66 property: 'background-image', |
| 67 from: 'unset', |
| 68 to: to, |
| 69 }); |
| 70 |
| 71 // Image to image |
| 72 from = 'url(../resources/blue-100.png)'; |
| 73 to = 'url(../resources/green-100.png)'; |
| 74 assertInterpolation({ |
| 75 property: 'background-image', |
| 24 from: from, | 76 from: from, |
| 25 to: to, | 77 to: to, |
| 26 }, [ | 78 }, [ |
| 27 {at: -0.3, is: from}, | 79 {at: -0.3, is: from}, |
| 28 {at: 0, is: from}, | 80 {at: 0, is: from}, |
| 29 {at: 0.3, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.3)'}, | 81 {at: 0.3, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.3)'}, |
| 30 {at: 0.6, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.6)'}, | 82 {at: 0.6, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.6)'}, |
| 31 {at: 1, is: to}, | 83 {at: 1, is: to}, |
| 32 {at: 1.5, is: to}, | 84 {at: 1.5, is: to}, |
| 33 ]); | 85 ]); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // Multiple mismatched types | 156 // Multiple mismatched types |
| 105 from = 'url(../resources/blue-100.png), none'; | 157 from = 'url(../resources/blue-100.png), none'; |
| 106 to = 'url(../resources/stripes-100.png), url(../resources/green-100.png)'; | 158 to = 'url(../resources/stripes-100.png), url(../resources/green-100.png)'; |
| 107 assertNoInterpolation({ | 159 assertNoInterpolation({ |
| 108 property: 'background-image', | 160 property: 'background-image', |
| 109 from: from, | 161 from: from, |
| 110 to: to, | 162 to: to, |
| 111 }); | 163 }); |
| 112 </script> | 164 </script> |
| 113 </body> | 165 </body> |
| OLD | NEW |