| Index: third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-registered-any-order.html
|
| diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-registered-any-order.html b/third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-registered-any-order.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..599366ea04e13c8861c357f27bb6f9a66b096f4c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-registered-any-order.html
|
| @@ -0,0 +1,32 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<div id="target"></div>
|
| +<script>
|
| +for (let name of ['--a', '--b']) {
|
| + CSS.registerProperty({
|
| + name,
|
| + syntax: '<number>',
|
| + initialValue: '0',
|
| + });
|
| +}
|
| +
|
| +test(() => {
|
| + let a = target.animate({'--a': ['100', 'var(--b)']}, 100);
|
| + let b = target.animate({'--b': ['200', '200']}, 100);
|
| +
|
| + a.currentTime = 50;
|
| + assert_equals(getComputedStyle(target).getPropertyValue('--a'), '150', '--a animating towards --b');
|
| + assert_equals(getComputedStyle(target).getPropertyValue('--b'), '200', '--b stationary at 200');
|
| +
|
| + a.cancel();
|
| + b.cancel();
|
| +
|
| + a = target.animate({'--a': ['200', '200']}, 100);
|
| + b = target.animate({'--b': ['100', 'var(--a)']}, 100);
|
| +
|
| + b.currentTime = 50;
|
| + assert_equals(getComputedStyle(target).getPropertyValue('--a'), '200', '--a stationary at 200');
|
| + assert_equals(getComputedStyle(target).getPropertyValue('--b'), '150', '--b animating towards --a');
|
| +}, 'Registered custom property animation keyframes with var() references should not be affected by name ordering');
|
| +</script>
|
|
|