| <!DOCTYPE html> |
| <meta charset="UTF-8"> |
| <style> |
| .target { |
| color: white; |
| width: 100px; |
| height: 100px; |
| background-color: black; |
| display: inline-block; |
| overflow: hidden; |
| } |
| .replica { |
| background-color: green; |
| } |
| .target div { |
| width: 10px; |
| height: 10px; |
| display: inline-block; |
| background: orange; |
| margin: 1px; |
| } |
| .test { |
| overflow: hidden; |
| } |
| </style> |
| <body> |
| <template id="target-template"> |
| <div></div> |
| </template> |
| <script src="../testharness/testharness.js"></script> |
| <script src="../testharness/testharnessreport.js"></script> |
| <script src="resources/interpolation-test.js"></script> |
| <script> |
| |
| // Mismatched interpolation with an empty list should not use decomposition. |
| assertInterpolation({ |
| property: 'transform', |
| prefixedProperty: ['-webkit-transform'], |
| from: 'none', |
| to: 'rotate(180deg)' |
| }, [ |
| {at: -1, is: 'rotate(-180deg)'}, |
| {at: 0, is: 'none'}, |
| {at: 0.25, is: 'rotate(45deg)'}, |
| {at: 0.75, is: 'rotate(135deg)'}, |
| {at: 1, is: 'rotate(180deg)'}, |
| {at: 2, is: 'rotate(360deg)'}, |
| ]); |
| assertInterpolation({ |
| property: 'transform', |
| prefixedProperty: ['-webkit-transform'], |
| from: 'rotate(180deg)', |
| to: 'none' |
| }, [ |
| {at: -1, is: 'rotate(360deg)'}, |
| {at: 0, is: 'rotate(180deg)'}, |
| {at: 0.25, is: 'rotate(135deg)'}, |
| {at: 0.75, is: 'rotate(45deg)'}, |
| {at: 1, is: 'none'}, |
| {at: 2, is: 'rotate(-180deg)'}, |
| ]); |
| assertInterpolation({ |
| property: 'transform', |
| prefixedProperty: ['-webkit-transform'], |
| from: 'none', |
| to: 'rotate(360deg)' |
| }, [ |
| {at: -1, is: 'rotate(-360deg)'}, |
| {at: 0, is: 'none'}, |
| {at: 0.25, is: 'rotate(90deg)'}, |
| {at: 0.75, is: 'rotate(270deg)'}, |
| {at: 1, is: 'rotate(360deg)'}, |
| {at: 2, is: 'rotate(720deg)'}, |
| ]); |
| </script> |
| </body> |