Update web-platform-tests to revision a4482f355e2848f4623cf46f521cb9b3bca56129

This commit is contained in:
WPT Sync Bot 2020-04-14 08:19:18 +00:00
parent 33a74a4f4e
commit 10cafa3df2
86 changed files with 1024 additions and 172 deletions

View file

@ -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>