diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2020-04-14 08:19:18 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2020-04-14 11:10:36 +0000 |
commit | 10cafa3df2f20eba3d3ad960fe789e6fba339573 (patch) | |
tree | 23ba820f821dbe02393c7bb8386af54e24ba8431 /tests/wpt/web-platform-tests/css/css-properties-values-api | |
parent | 33a74a4f4eb9a4df0b6ccf2b6988331e59ae2baa (diff) | |
download | servo-10cafa3df2f20eba3d3ad960fe789e6fba339573.tar.gz servo-10cafa3df2f20eba3d3ad960fe789e6fba339573.zip |
Update web-platform-tests to revision a4482f355e2848f4623cf46f521cb9b3bca56129
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-properties-values-api')
-rw-r--r-- | tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-revert.html | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-revert.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-revert.html index 3d0473ea439..33c395d2c2f 100644 --- a/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-revert.html +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-revert.html @@ -14,11 +14,33 @@ --inherited: revert; --non-inherited: revert; } + + @keyframes revert_animation { + from { + --animated-inherited: revert; + --animated-non-inherited: revert; + } + to { + --animated-inherited: 100px; + --animated-non-inherited: 100px; + } + } + + #animated_parent { + --animated-inherited: 0px; + } + #animated_child { + animation: revert_animation 10s -5s linear paused; + } </style> <div id=parent> <div id=child> </div> </div> +<div id=animated_parent> + <div id=animated_child> + </div> +</div> <script> CSS.registerProperty({ @@ -35,6 +57,20 @@ CSS.registerProperty({ inherits: false }); +CSS.registerProperty({ + name: "--animated-non-inherited", + syntax: "<length>", + initialValue: "0px", + inherits: false +}); + +CSS.registerProperty({ + name: "--animated-inherited", + syntax: "<length>", + initialValue: "10000px", + inherits: true +}); + test(function(){ let cs = getComputedStyle(child); assert_equals(cs.getPropertyValue('--inherited'), '10px'); @@ -45,4 +81,14 @@ test(function(){ assert_equals(cs.getPropertyValue('--non-inherited'), '0px'); }, 'Non-inherited registered custom property can be reverted'); +test(function(){ + let cs = getComputedStyle(animated_child); + assert_equals(cs.getPropertyValue('--animated-non-inherited'), '50px'); +}, 'Non-inherited registered custom property can be reverted in animation'); + +test(function(){ + let cs = getComputedStyle(animated_child); + assert_equals(cs.getPropertyValue('--animated-inherited'), '50px'); +}, 'Inherited registered custom property can be reverted in animation'); + </script> |