mirror of
https://github.com/servo/servo.git
synced 2025-08-22 05:45:33 +01:00
Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317
This commit is contained in:
parent
aa199307c8
commit
2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions
|
@ -2,7 +2,7 @@
|
|||
<meta charset=utf-8>
|
||||
<title>Playing an animation</title>
|
||||
<link rel="help"
|
||||
href="https://w3c.github.io/web-animations/#playing-an-animation-section">
|
||||
href="https://drafts.csswg.org/web-animations/#playing-an-animation-section">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../../testcommon.js"></script>
|
||||
|
@ -11,24 +11,24 @@
|
|||
<script>
|
||||
'use strict';
|
||||
|
||||
test(function(t) {
|
||||
var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
animation.currentTime = 1 * MS_PER_SEC;
|
||||
assert_times_equal(animation.currentTime, 1 * MS_PER_SEC);
|
||||
animation.play();
|
||||
assert_times_equal(animation.currentTime, 1 * MS_PER_SEC);
|
||||
}, 'Playing a running animation leaves the current time unchanged');
|
||||
|
||||
test(function(t) {
|
||||
var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
animation.finish();
|
||||
assert_times_equal(animation.currentTime, 100 * MS_PER_SEC);
|
||||
animation.play();
|
||||
assert_times_equal(animation.currentTime, 0);
|
||||
}, 'Playing a finished animation seeks back to the start');
|
||||
|
||||
test(function(t) {
|
||||
var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
animation.playbackRate = -1;
|
||||
animation.currentTime = 0;
|
||||
assert_times_equal(animation.currentTime, 0);
|
||||
|
@ -36,7 +36,7 @@ test(function(t) {
|
|||
assert_times_equal(animation.currentTime, 100 * MS_PER_SEC);
|
||||
}, 'Playing a finished and reversed animation seeks to end');
|
||||
|
||||
test(function(t) {
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
animation.cancel();
|
||||
const promise = animation.ready;
|
||||
|
@ -45,7 +45,7 @@ test(function(t) {
|
|||
}, 'The ready promise should be replaced if the animation is not already'
|
||||
+ ' pending');
|
||||
|
||||
promise_test(function(t) {
|
||||
promise_test(t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
const promise = animation.ready;
|
||||
return promise.then(p => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue