mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Update web-platform-tests to revision 0a518aaff73532a26e175789f7e75fa99593ac64
This commit is contained in:
parent
9c172f49d0
commit
abcd4b654f
92 changed files with 2869 additions and 642 deletions
|
@ -70,6 +70,46 @@ test(function(t) {
|
|||
}, 'Overlapping keyframes between 0 and 1 use the appropriate value on each'
|
||||
+ ' side of the overlap point');
|
||||
|
||||
test(function(t) {
|
||||
var div = createDiv(t);
|
||||
var anim = div.animate({ visibility: ['hidden','visible'] },
|
||||
{ duration: 100 * MS_PER_SEC, fill: 'both' });
|
||||
|
||||
anim.currentTime = 0;
|
||||
assert_equals(getComputedStyle(div).visibility, 'hidden',
|
||||
'Visibility when progress = 0.');
|
||||
|
||||
anim.currentTime = 10 * MS_PER_SEC + 1;
|
||||
assert_equals(getComputedStyle(div).visibility, 'visible',
|
||||
'Visibility when progress > 0 due to linear easing.');
|
||||
|
||||
anim.finish();
|
||||
assert_equals(getComputedStyle(div).visibility, 'visible',
|
||||
'Visibility when progress = 1.');
|
||||
|
||||
}, "Test visibility clamping behavior.");
|
||||
|
||||
test(function(t) {
|
||||
var div = createDiv(t);
|
||||
var anim = div.animate({ visibility: ['hidden', 'visible'] },
|
||||
{ duration: 100 * MS_PER_SEC, fill: 'both',
|
||||
easing: 'cubic-bezier(0.25, -0.6, 0, 0.5)' });
|
||||
|
||||
anim.currentTime = 0;
|
||||
assert_equals(getComputedStyle(div).visibility, 'hidden',
|
||||
'Visibility when progress = 0.');
|
||||
|
||||
// Timing function is below zero. So we expected visibility is hidden.
|
||||
anim.currentTime = 10 * MS_PER_SEC + 1;
|
||||
assert_equals(getComputedStyle(div).visibility, 'hidden',
|
||||
'Visibility when progress < 0 due to cubic-bezier easing.');
|
||||
|
||||
anim.currentTime = 60 * MS_PER_SEC;
|
||||
assert_equals(getComputedStyle(div).visibility, 'visible',
|
||||
'Visibility when progress > 0 due to cubic-bezier easing.');
|
||||
|
||||
}, "Test visibility clamping behavior with an easing that has a negative component");
|
||||
|
||||
done();
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue