| Index: LayoutTests/animations/interpolation/viewport-unit-interpolation.html
|
| diff --git a/LayoutTests/animations/interpolation/viewport-unit-interpolation.html b/LayoutTests/animations/interpolation/viewport-unit-interpolation.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ea03961db48b2023ee19ad5d4ca4cfc56a5ab7be
|
| --- /dev/null
|
| +++ b/LayoutTests/animations/interpolation/viewport-unit-interpolation.html
|
| @@ -0,0 +1,43 @@
|
| +<!doctype html>
|
| +<style>
|
| +
|
| +.target {
|
| + font-size: 16px;
|
| + width: 60px;
|
| + height: 60px;
|
| + display: inline-block;
|
| + border: 2px solid black;
|
| + margin-right: 2px;
|
| +}
|
| +.replica {
|
| + background-color: green;
|
| + margin-right: 15px;
|
| +}
|
| +
|
| +</style>
|
| +<body>
|
| +<script src="resources/interpolation-test.js"></script>
|
| +<script>
|
| +
|
| +function vw(x) {
|
| + return (x * window.innerWidth / 100);
|
| +}
|
| +
|
| +function calc(x) {
|
| + return Math.max(16 + (vw(10) - 16) * x, 0).toFixed(2) + "px";
|
| +}
|
| +
|
| +assertInterpolation({
|
| + property: 'width',
|
| + from: '1em',
|
| + to: '10vw'
|
| +}, [
|
| + {at: -0.3, is: calc(-0.3)},
|
| + {at: 0, is: calc(0)},
|
| + {at: 0.3, is: calc(0.3)},
|
| + {at: 0.6, is: calc(0.6)},
|
| + {at: 1, is: calc(1)},
|
| + {at: 1.5, is: calc(1.5)}
|
| +]);
|
| +</script>
|
| +</body>
|
|
|