mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Update web-platform-tests to revision b'3ee7ccc2abbbc8d8f6efbb45f80bffdb3c0c76ba'
This commit is contained in:
parent
111363d338
commit
2ebdfcea9d
630 changed files with 8297 additions and 4979 deletions
|
@ -40,4 +40,53 @@ test_shorthand_value('animation',
|
|||
'animation-name': 'anim1, anim2, anim3',
|
||||
'animation-timeline': 'auto, auto, auto'
|
||||
});
|
||||
|
||||
test((t) => {
|
||||
t.add_cleanup(() => {
|
||||
target.style = '';
|
||||
});
|
||||
|
||||
target.style.animation = 'anim 1s';
|
||||
target.style.animationTimeline = 'timeline';
|
||||
assert_equals(target.style.animation, '');
|
||||
assert_equals(target.style.animationName, 'anim');
|
||||
assert_equals(target.style.animationDuration, '1s');
|
||||
}, 'Animation shorthand can not represent non-initial timelines (specified)');
|
||||
|
||||
test((t) => {
|
||||
t.add_cleanup(() => {
|
||||
target.style = '';
|
||||
});
|
||||
|
||||
target.style.animation = 'anim 1s';
|
||||
target.style.animationTimeline = 'timeline';
|
||||
assert_equals(getComputedStyle(target).animation, '');
|
||||
assert_equals(getComputedStyle(target).animationName, 'anim');
|
||||
assert_equals(getComputedStyle(target).animationDuration, '1s');
|
||||
}, 'Animation shorthand can not represent non-initial timelines (computed)');
|
||||
|
||||
test((t) => {
|
||||
t.add_cleanup(() => {
|
||||
target.style = '';
|
||||
});
|
||||
|
||||
target.style.animation = 'anim 1s';
|
||||
target.style.animationDelayEnd = '42s';
|
||||
assert_equals(target.style.animation, '');
|
||||
assert_equals(target.style.animationName, 'anim');
|
||||
assert_equals(target.style.animationDuration, '1s');
|
||||
}, 'Animation shorthand can not represent non-initial animation-delay-end (specified)');
|
||||
|
||||
test((t) => {
|
||||
t.add_cleanup(() => {
|
||||
target.style = '';
|
||||
});
|
||||
|
||||
target.style.animation = 'anim 1s';
|
||||
target.style.animationDelayEnd = '42s';
|
||||
assert_equals(getComputedStyle(target).animation, '');
|
||||
assert_equals(getComputedStyle(target).animationName, 'anim');
|
||||
assert_equals(getComputedStyle(target).animationDuration, '1s');
|
||||
}, 'Animation shorthand can not represent non-initial animation-delay-end (computed)');
|
||||
|
||||
</script>
|
||||
|
|
|
@ -655,8 +655,25 @@ promise_test(async t => {
|
|||
assert_equals(getComputedStyle(target).translate, '100px');
|
||||
}, 'scroll-timeline-axis is vertical');
|
||||
|
||||
// TODO: Add more tests which change scroll-timeline-axis property.
|
||||
// Those animations which use this timeline should be restyled properly.
|
||||
promise_test(async t => {
|
||||
let [scroller, target] = createScrollerAndTarget(t);
|
||||
|
||||
document.body.appendChild(scroller);
|
||||
document.body.appendChild(target);
|
||||
|
||||
scroller.style.scrollTimeline = 'timeline block';
|
||||
target.style.animation = "anim 10s linear";
|
||||
target.style.animationTimeline = 'timeline';
|
||||
|
||||
scroller.scrollTop = 50;
|
||||
scroller.scrollLeft = 25;
|
||||
await waitForNextFrame();
|
||||
assert_equals(getComputedStyle(target).translate, '100px');
|
||||
|
||||
scroller.style.scrollTimelineAxis = 'inline';
|
||||
await waitForNextFrame();
|
||||
assert_equals(getComputedStyle(target).translate, '75px');
|
||||
}, 'scroll-timeline-axis is mutated');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue