| Index: third_party/WebKit/LayoutTests/animations/custom-properties/unregistered-var-chain.html
|
| diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/unregistered-var-chain.html b/third_party/WebKit/LayoutTests/animations/custom-properties/unregistered-var-chain.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7bcb08c0cd10a7fb9dfca64585b9ecc4495d7d9a
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/animations/custom-properties/unregistered-var-chain.html
|
| @@ -0,0 +1,33 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<style>
|
| +@keyframes test {
|
| + from { --x: green; }
|
| + to { --x: lime; }
|
| +}
|
| +div {
|
| + --x: red;
|
| + --y: var(--x);
|
| + background-color: var(--y);
|
| +}
|
| +#targetA {
|
| + animation: test 10s -2.5s;
|
| +}
|
| +#targetB {
|
| + animation: test 10s -7.5s;
|
| +}
|
| +</style>
|
| +<div id="targetA"></div>
|
| +<div id="targetB"></div>
|
| +<script>
|
| +test(() => {
|
| + assert_equals(getComputedStyle(targetA).getPropertyValue('--y'), ' green');
|
| + assert_equals(getComputedStyle(targetB).getPropertyValue('--y'), ' lime');
|
| +}, 'CSS Animations on var() chained custom properties should be applied');
|
| +
|
| +test(() => {
|
| + assert_equals(getComputedStyle(targetA).backgroundColor, 'rgb(0, 128, 0)');
|
| + assert_equals(getComputedStyle(targetB).backgroundColor, 'rgb(0, 255, 0)');
|
| +}, 'CSS Animations on var() chained custom properties should be reflected in var() references');
|
| +</script>
|
|
|