Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317

This commit is contained in:
Josh Matthews 2018-01-04 13:44:24 -05:00
parent aa199307c8
commit 2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions

View file

@ -1,24 +1,24 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Animation.onfinish</title>
<link rel="help" href="https://w3c.github.io/web-animations/#dom-animation-onfinish">
<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animation-onfinish">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../testcommon.js"></script>
<body>
<div id="log"></div>
<script>
"use strict";
'use strict';
async_test(function(t) {
var div = createDiv(t);
var animation = div.animate({}, 100 * MS_PER_SEC);
var finishedTimelineTime;
animation.finished.then(function() {
async_test(t => {
const div = createDiv(t);
const animation = div.animate({}, 100 * MS_PER_SEC);
let finishedTimelineTime;
animation.finished.then(() => {
finishedTimelineTime = animation.timeline.currentTime;
});
animation.onfinish = t.step_func_done(function(event) {
animation.onfinish = t.step_func_done(event => {
assert_equals(event.currentTime, 0,
'event.currentTime should be zero');
assert_equals(event.timelineTime, finishedTimelineTime,
@ -30,16 +30,16 @@ async_test(function(t) {
}, 'onfinish event is fired when the currentTime < 0 and ' +
'the playbackRate < 0');
async_test(function(t) {
var div = createDiv(t);
var animation = div.animate({}, 100 * MS_PER_SEC);
async_test(t => {
const div = createDiv(t);
const animation = div.animate({}, 100 * MS_PER_SEC);
var finishedTimelineTime;
animation.finished.then(function() {
let finishedTimelineTime;
animation.finished.then(() => {
finishedTimelineTime = animation.timeline.currentTime;
});
animation.onfinish = t.step_func_done(function(event) {
animation.onfinish = t.step_func_done(event => {
assert_equals(event.currentTime, 100 * MS_PER_SEC,
'event.currentTime should be the effect end');
assert_equals(event.timelineTime, finishedTimelineTime,
@ -51,16 +51,16 @@ async_test(function(t) {
}, 'onfinish event is fired when the currentTime > 0 and ' +
'the playbackRate > 0');
async_test(function(t) {
var div = createDiv(t);
var animation = div.animate({}, 100 * MS_PER_SEC);
async_test(t => {
const div = createDiv(t);
const animation = div.animate({}, 100 * MS_PER_SEC);
var finishedTimelineTime;
animation.finished.then(function() {
let finishedTimelineTime;
animation.finished.then(() => {
finishedTimelineTime = animation.timeline.currentTime;
});
animation.onfinish = t.step_func_done(function(event) {
animation.onfinish = t.step_func_done(event => {
assert_equals(event.currentTime, 100 * MS_PER_SEC,
'event.currentTime should be the effect end');
assert_equals(event.timelineTime, finishedTimelineTime,
@ -71,45 +71,45 @@ async_test(function(t) {
animation.finish();
}, 'onfinish event is fired when animation.finish() is called');
promise_test(function(t) {
var div = createDiv(t);
var animation = div.animate({}, 100 * MS_PER_SEC);
promise_test(t => {
const div = createDiv(t);
const animation = div.animate({}, 100 * MS_PER_SEC);
animation.onfinish = function(event) {
animation.onfinish = event => {
assert_unreached('onfinish event should not be fired');
};
animation.currentTime = 100 * MS_PER_SEC / 2;
animation.pause();
return animation.ready.then(function() {
return animation.ready.then(() => {
animation.currentTime = 100 * MS_PER_SEC;
return waitForAnimationFrames(2);
});
}, 'onfinish event is not fired when paused');
promise_test(function(t) {
var div = createDiv(t);
var animation = div.animate({}, 100 * MS_PER_SEC);
animation.onfinish = function(event) {
promise_test(t => {
const div = createDiv(t);
const animation = div.animate({}, 100 * MS_PER_SEC);
animation.onfinish = event => {
assert_unreached('onfinish event should not be fired');
};
return animation.ready.then(function() {
return animation.ready.then(() => {
animation.playbackRate = 0;
animation.currentTime = 100 * MS_PER_SEC;
return waitForAnimationFrames(2);
});
}, 'onfinish event is not fired when the playbackRate is zero');
promise_test(function(t) {
var div = createDiv(t);
var animation = div.animate({}, 100 * MS_PER_SEC);
animation.onfinish = function(event) {
promise_test(t => {
const div = createDiv(t);
const animation = div.animate({}, 100 * MS_PER_SEC);
animation.onfinish = event => {
assert_unreached('onfinish event should not be fired');
};
return animation.ready.then(function() {
return animation.ready.then(() => {
animation.currentTime = 100 * MS_PER_SEC;
animation.currentTime = 100 * MS_PER_SEC / 2;
return waitForAnimationFrames(2);