| Index: third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-unregistered-animating.html
|
| diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-unregistered-animating.html b/third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-unregistered-animating.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f1bfa18406ffd12a98b87cf524c5ea3762d01329
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-unregistered-animating.html
|
| @@ -0,0 +1,39 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<style>
|
| +#target {
|
| + --from: 100;
|
| +}
|
| +</style>
|
| +<div id="target"></div>
|
| +<script>
|
| +CSS.registerProperty({
|
| + name: '--test',
|
| + syntax: '<number>',
|
| + initialValue: '0',
|
| +});
|
| +
|
| +test(() => {
|
| + let animation = target.animate({'--test': ['var(--from)', 'var(--to)']}, 100);
|
| + let toAnimation = target.animate({'--to': ['200', '300']}, 100);
|
| +
|
| + toAnimation.currentTime = 25;
|
| + {
|
| + animation.currentTime = 25;
|
| + assert_equals(getComputedStyle(target).getPropertyValue('--test'), '125', 'target at 25%, to at 25%');
|
| +
|
| + animation.currentTime = 75;
|
| + assert_equals(getComputedStyle(target).getPropertyValue('--test'), '175', 'target at 75%, to at 25%');
|
| + }
|
| +
|
| + toAnimation.currentTime = 75;
|
| + {
|
| + animation.currentTime = 25;
|
| + assert_equals(getComputedStyle(target).getPropertyValue('--test'), '150', 'target at 25%, to at 75%');
|
| +
|
| + animation.currentTime = 75;
|
| + assert_equals(getComputedStyle(target).getPropertyValue('--test'), '250', 'target at 75%, to at 75%');
|
| + }
|
| +}, 'Registered custom property animation keyframes with var() references to animating unregistered custom properties');
|
| +</script>
|
|
|