| Index: third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html
|
| diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html b/third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..953848c2f585bc292e2f1a8c03230e2fbf62ff19
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html
|
| @@ -0,0 +1,104 @@
|
| +<!DOCTYPE html>
|
| +<meta charset="UTF-8">
|
| +<style>
|
| +.parent {
|
| + --time: 30s;
|
| +}
|
| +.target {
|
| + --time: 10s;
|
| +}
|
| +</style>
|
| +<body>
|
| +<script src="../interpolation/resources/interpolation-test.js"></script>
|
| +<script>
|
| +CSS.registerProperty({
|
| + name: '--time',
|
| + syntax: '<time>',
|
| + initialValue: '40s',
|
| +});
|
| +
|
| +assertInterpolation({
|
| + property: '--time',
|
| + from: neutralKeyframe,
|
| + to: '20s',
|
| +}, [
|
| + {at: -0.3, is: '7s'},
|
| + {at: 0, is: '10s'},
|
| + {at: 0.5, is: '15s'},
|
| + {at: 1, is: '20s'},
|
| + {at: 1.5, is: '25s'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--time',
|
| + from: 'initial',
|
| + to: '20s',
|
| +}, [
|
| + {at: -0.3, is: '46s'},
|
| + {at: 0, is: '40s'},
|
| + {at: 0.5, is: '30s'},
|
| + {at: 1, is: '20s'},
|
| + {at: 1.5, is: '10s'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--time',
|
| + from: 'inherit',
|
| + to: '20s',
|
| +}, [
|
| + {at: -0.3, is: '33s'},
|
| + {at: 0, is: '30s'},
|
| + {at: 0.5, is: '25s'},
|
| + {at: 1, is: '20s'},
|
| + {at: 1.5, is: '15s'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--time',
|
| + from: 'unset',
|
| + to: '20s',
|
| +}, [
|
| + {at: -0.3, is: '46s'},
|
| + {at: 0, is: '40s'},
|
| + {at: 0.5, is: '30s'},
|
| + {at: 1, is: '20s'},
|
| + {at: 1.5, is: '10s'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--time',
|
| + from: '-10s',
|
| + to: '10s',
|
| +}, [
|
| + {at: -0.3, is: '-16s'},
|
| + {at: 0, is: '-10s'},
|
| + {at: 0.5, is: '0s'},
|
| + {at: 1, is: '10s'},
|
| + {at: 1.5, is: '20s'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--time',
|
| + from: '100ms',
|
| + to: '200ms',
|
| +}, [
|
| + {at: -0.3, is: '0.07s'},
|
| + {at: 0, is: '0.1s'},
|
| + {at: 0.5, is: '0.15s'},
|
| + {at: 1, is: '0.2s'},
|
| + {at: 1.5, is: '0.25s'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: '--time',
|
| + from: '1000ms',
|
| + to: '11s',
|
| +}, [
|
| + {at: -0.3, is: '-2s'},
|
| + {at: 0, is: '1s'},
|
| + {at: 0.5, is: '6s'},
|
| + {at: 1, is: '11s'},
|
| + {at: 1.5, is: '16s'},
|
| +]);
|
| +</script>
|
| +</body>
|
|
|