| Index: third_party/WebKit/LayoutTests/animations/custom-properties/length-type-interpolation.html
|
| diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/length-type-interpolation.html b/third_party/WebKit/LayoutTests/animations/custom-properties/length-type-interpolation.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e6878e727f2b92b8614a713801ac69f7e7c3dbae
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/animations/custom-properties/length-type-interpolation.html
|
| @@ -0,0 +1,105 @@
|
| +<!DOCTYPE html>
|
| +<meta charset="UTF-8">
|
| +<style>
|
| +.parent {
|
| + --length: 30px;
|
| +}
|
| +.target {
|
| + --length: 10px;
|
| + font-size: 20px;
|
| +}
|
| +</style>
|
| +<body>
|
| +<script src="../interpolation/resources/interpolation-test.js"></script>
|
| +<script>
|
| +CSS.registerProperty({
|
| + name: '--length',
|
| + syntax: '<length>',
|
| + initialValue: '40px',
|
| +});
|
| +
|
| +assertInterpolation({
|
| + property: '--length',
|
| + from: neutralKeyframe,
|
| + to: '20px',
|
| +}, [
|
| + {at: -0.3, is: '7px'},
|
| + {at: 0, is: '10px'},
|
| + {at: 0.5, is: '15px'},
|
| + {at: 1, is: '20px'},
|
| + {at: 1.5, is: '25px'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--length',
|
| + from: 'initial',
|
| + to: '20px',
|
| +}, [
|
| + {at: -0.3, is: '46px'},
|
| + {at: 0, is: '40px'},
|
| + {at: 0.5, is: '30px'},
|
| + {at: 1, is: '20px'},
|
| + {at: 1.5, is: '10px'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--length',
|
| + from: 'inherit',
|
| + to: '20px',
|
| +}, [
|
| + {at: -0.3, is: '33px'},
|
| + {at: 0, is: '30px'},
|
| + {at: 0.5, is: '25px'},
|
| + {at: 1, is: '20px'},
|
| + {at: 1.5, is: '15px'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--length',
|
| + from: 'unset',
|
| + to: '20px',
|
| +}, [
|
| + {at: -0.3, is: '46px'},
|
| + {at: 0, is: '40px'},
|
| + {at: 0.5, is: '30px'},
|
| + {at: 1, is: '20px'},
|
| + {at: 1.5, is: '10px'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--length',
|
| + from: '-10px',
|
| + to: '10px',
|
| +}, [
|
| + {at: -0.3, is: '-16px'},
|
| + {at: 0, is: '-10px'},
|
| + {at: 0.5, is: '0px'},
|
| + {at: 1, is: '10px'},
|
| + {at: 1.5, is: '20px'}
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--length',
|
| + from: '10em',
|
| + to: '20em',
|
| +}, [
|
| + {at: -0.3, is: '140px'},
|
| + {at: 0, is: '200px'},
|
| + {at: 0.5, is: '300px'},
|
| + {at: 1, is: '400px'},
|
| + {at: 1.5, is: '500px'}
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--length',
|
| + from: '10em',
|
| + to: '100px',
|
| +}, [
|
| + {at: -0.3, is: '230px'},
|
| + {at: 0, is: '200px'},
|
| + {at: 0.5, is: '150px'},
|
| + {at: 1, is: '100px'},
|
| + {at: 1.5, is: '50px'}
|
| +]);
|
| +</script>
|
| +</body>
|
|
|