| <!DOCTYPE html> |
| <meta charset="UTF-8"> |
| <style> |
| .parent { |
| shape-image-threshold: 0.4; |
| } |
| .target { |
| shape-image-threshold: 0.6; |
| } |
| </style> |
| <body> |
| <script src="resources/interpolation-test.js"></script> |
| <script> |
| assertInterpolation({ |
| property: 'shape-image-threshold', |
| from: neutralKeyframe, |
| to: '0.8', |
| }, [ |
| {at: -1.5, is: '0.3'}, |
| {at: -0.5, is: '0.5'}, |
| {at: 0, is: '0.6'}, |
| {at: 0.5, is: '0.7'}, |
| {at: 1, is: '0.8'}, |
| {at: 1.5, is: '0.9'}, |
| ]); |
| |
| assertInterpolation({ |
| property: 'shape-image-threshold', |
| from: 'initial', |
| to: '0.8', |
| }, [ |
| {at: -1.5, is: '0'}, |
| {at: -0.5, is: '0'}, |
| {at: 0, is: '0'}, |
| {at: 0.5, is: '0.4'}, |
| {at: 1, is: '0.8'}, |
| {at: 1.5, is: '1'}, |
| ]); |
| |
| assertInterpolation({ |
| property: 'shape-image-threshold', |
| from: 'inherit', |
| to: '0.8', |
| }, [ |
| {at: -1.5, is: '0'}, |
| {at: -0.5, is: '0.2'}, |
| {at: 0, is: '0.4'}, |
| {at: 0.5, is: '0.6'}, |
| {at: 1, is: '0.8'}, |
| {at: 1.5, is: '1'}, |
| ]); |
| |
| assertInterpolation({ |
| property: 'shape-image-threshold', |
| from: 'unset', |
| to: '0.8', |
| }, [ |
| {at: -1.5, is: '0'}, |
| {at: -0.5, is: '0'}, |
| {at: 0, is: '0'}, |
| {at: 0.5, is: '0.4'}, |
| {at: 1, is: '0.8'}, |
| {at: 1.5, is: '1'}, |
| ]); |
| |
| assertInterpolation({ |
| property: 'shape-image-threshold', |
| from: '0.5', |
| to: '1' |
| }, [ |
| {at: -1.5, is: '0'}, |
| {at: -0.5, is: '0.25'}, |
| {at: 0, is: '0.5'}, |
| {at: 0.5, is: '0.75'}, |
| {at: 1, is: '1'}, |
| {at: 1.5, is: '1'} |
| ]); |
| </script> |
| </body> |