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