Update web-platform-tests to revision 346d5b51a122f7bb1c7747064499ef281a0200f7

This commit is contained in:
Ms2ger 2016-06-24 10:13:49 +02:00
parent 581c8ba1c8
commit 79b1e6c40c
1728 changed files with 20243 additions and 5349 deletions

View file

@ -19,23 +19,43 @@ var gTestArguments = [
{
effect: null,
timeline: null,
expectedTimeline: null,
expectedTimelineDescription: "null",
description: "with null effect and null timeline"
},
{
effect: null,
timeline: document.timeline,
expectedTimeline: document.timeline,
expectedTimelineDescription: "document.timeline",
description: "with null effect and non-null timeline"
},
{
effect: null,
expectedTimeline: document.timeline,
expectedTimelineDescription: "document.timeline",
description: "with null effect and no timeline parameter"
},
{
effect: gEffect,
timeline: null,
expectedTimeline: null,
expectedTimelineDescription: "null",
description: "with non-null effect and null timeline"
},
{
effect: gEffect,
timeline: document.timeline,
expectedTimeline: document.timeline,
expectedTimelineDescription: "document.timeline",
description: "with non-null effect and non-null timeline"
},
{
effect: gEffect,
expectedTimeline: document.timeline,
expectedTimelineDescription: "document.timeline",
description: "with non-null effect and no timeline parameter"
},
];
gTestArguments.forEach(function(args) {
@ -47,9 +67,8 @@ gTestArguments.forEach(function(args) {
assert_equals(animation.effect, args.effect,
"Animation returns the same effect passed to " +
"the Constructor");
assert_equals(animation.timeline, args.timeline,
"Animation returns the same timeline passed to " +
"the Constructor");
assert_equals(animation.timeline, args.expectedTimeline,
"Animation timeline should be " + args.expectedTimelineDescription);
assert_equals(animation.playState, "idle",
"Animation.playState should be initially 'idle'");
}, "Animation can be constructed " + args.description);
@ -69,5 +88,20 @@ test(function(t) {
assert_equals(effect.getComputedTiming().progress, 1.0);
}, "Animation constructed by an effect with null target runs normally");
async_test(function(t) {
var iframe = document.createElement('iframe');
iframe.addEventListener('load', t.step_func(function() {
var div = createDiv(t, iframe.contentDocument);
var effect = new KeyframeEffectReadOnly(div, null, 10000);
var anim = new Animation(effect);
assert_equals(anim.timeline, document.timeline);
iframe.remove();
t.done();
}));
document.body.appendChild(iframe);
}, "Animation constructed with a keyframe that target element is in iframe");
</script>
</body>

View file

@ -146,5 +146,14 @@ test(function(t) {
t.done();
}, 'reverse() when playbackRate == 0');
test(function(t) {
var div = createDiv(t);
var animation =
new Animation(new KeyframeEffect(div, null, 100 * MS_PER_SEC), null);
assert_throws('InvalidStateError', function() { animation.reverse(); });
}, 'Reversing an animation without an active timeline throws an ' +
'InvalidStateError');
</script>
</body>