| <!DOCTYPE html> |
| <meta charset="UTF-8"> |
| <style> |
| .parent { |
| position: relative; |
| display: inline-block; |
| height: 10px; |
| margin: 0px; |
| } |
| .target { |
| width: 10px; |
| height: 10px; |
| background-color: black; |
| left: 10px; |
| position: 10px; |
| } |
| .expected { |
| background-color: green; |
| } |
| </style> |
| <template id="target-template"> |
| <div class="parent"> |
| <div class="target"></div> |
| </div> |
| </template> |
| <body> |
| <script src="resources/interpolation-test.js"></script> |
| <script> |
| assertNoInterpolation({ |
| property: 'position', |
| from: 'absolute', |
| to: 'static', |
| }); |
| |
| assertInterpolation({ |
| property: 'position', |
| from: neutralKeyframe, |
| to: 'absolute', |
| method: 'CSS Animations', |
| }, [ |
| {at: -1, is: 'static'}, |
| {at: 0, is: 'static'}, |
| {at: 0.25, is: 'static'}, |
| {at: 0.5, is: 'absolute'}, |
| {at: 0.75, is: 'absolute'}, |
| {at: 1, is: 'absolute'}, |
| {at: 2, is: 'absolute'}, |
| ]); |
| </script> |
| </body> |