Update web-platform-tests to revision e87f38097902e16348d4e17f4fe3bc2d0112bff1

This commit is contained in:
WPT Sync Bot 2018-03-17 21:12:30 -04:00
parent 2f8fa32e91
commit db5631a086
381 changed files with 11610 additions and 4232 deletions

View file

@ -29,7 +29,7 @@ test(t => {
const div = createDiv(t);
const animation = div.animate({ marginLeft: ['100px', '200px'] },
100 * MS_PER_SEC);
animation.effect.timing.easing = 'linear';
animation.effect.updateTiming({ easing: 'linear' });
animation.cancel();
assert_equals(getComputedStyle(div).marginLeft, '0px',
'margin-left style is not animated after cancelling');

View file

@ -14,7 +14,7 @@
const gTarget = document.getElementById('target');
function createEffect() {
return new KeyframeEffectReadOnly(gTarget, { opacity: [0, 1] });
return new KeyframeEffect(gTarget, { opacity: [0, 1] });
}
function createNull() {
@ -82,10 +82,9 @@ for (const args of gTestArguments) {
}
test(t => {
const effect = new KeyframeEffectReadOnly(null,
{ left: ['10px', '20px'] },
{ duration: 10000,
fill: 'forwards' });
const effect = new KeyframeEffect(null,
{ left: ['10px', '20px'] },
{ duration: 10000, fill: 'forwards' });
const anim = new Animation(effect, document.timeline);
anim.pause();
assert_equals(effect.getComputedTiming().progress, 0.0);
@ -100,7 +99,7 @@ async_test(t => {
iframe.addEventListener('load', t.step_func(() => {
const div = createDiv(t, iframe.contentDocument);
const effect = new KeyframeEffectReadOnly(div, null, 10000);
const effect = new KeyframeEffect(div, null, 10000);
const anim = new Animation(effect);
assert_equals(anim.timeline, document.timeline);
iframe.remove();

View file

@ -14,7 +14,7 @@ test(t => {
const anim = new Animation();
assert_equals(anim.effect, null, 'initial effect is null');
const newEffect = new KeyframeEffectReadOnly(createDiv(t), null);
const newEffect = new KeyframeEffect(createDiv(t), null);
anim.effect = newEffect;
assert_equals(anim.effect, newEffect, 'new effect is set');
}, 'effect is set correctly.');

View file

@ -189,7 +189,7 @@ promise_test(t => {
animation.currentTime = HALF_DUR;
return animation.ready.then(() => {
currentTimeBeforeShortening = animation.currentTime;
animation.effect.timing.duration = QUARTER_DUR;
animation.effect.updateTiming({ duration: QUARTER_DUR });
// Below we use gotNextFrame to check that shortening of the animation
// duration causes the finished promise to resolve, rather than it just
// getting resolved on the next animation frame. This relies on the fact
@ -206,7 +206,7 @@ promise_test(t => {
assert_equals(animation.currentTime, currentTimeBeforeShortening,
'currentTime should be unchanged when duration shortened');
const previousFinishedPromise = animation.finished;
animation.effect.timing.duration = 100 * MS_PER_SEC;
animation.effect.updateTiming({ duration: 100 * MS_PER_SEC });
assert_not_equals(animation.finished, previousFinishedPromise,
'Finished promise should change after lengthening the ' +
'duration causes the animation to become active');

View file

@ -10,11 +10,11 @@
<script type="text/plain" id="Animation-IDL">
enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" };
[Constructor (optional AnimationEffectReadOnly? effect = null,
[Constructor (optional AnimationEffect? effect = null,
optional AnimationTimeline? timeline)]
interface Animation : EventTarget {
attribute DOMString id;
attribute AnimationEffectReadOnly? effect;
attribute AnimationEffect? effect;
attribute AnimationTimeline? timeline;
attribute double? startTime;
attribute double? currentTime;