Bug 1343589 - Add a test for reversing with an infinite target effect end and playback rate of zero r=hiro

We already pass this test but it seemed like a useful test to add since I was
unsure if the early return we have in Animation::Reverse() is valid or not.

MozReview-Commit-ID: J38Euno3VP6

--HG--
extra : rebase_source : ae7f7607189f26385d299003cf48ecd675b615d2
This commit is contained in:
Brian Birtles 2017-03-28 14:51:53 +09:00
Родитель 3437435375
Коммит b83b680495
2 изменённых файлов: 17 добавлений и 1 удалений

Просмотреть файл

@ -207838,7 +207838,7 @@
"testharness"
],
"web-animations/timing-model/animations/reversing-an-animation.html": [
"9f8e9adb260f4b3cea834bbec6b603c50acbb9fd",
"80327fe9a7c68d280b7b4cfba42d081358ee1ea7",
"testharness"
],
"web-animations/timing-model/animations/set-the-animation-start-time.html": [

Просмотреть файл

@ -131,6 +131,22 @@ test(function(t) {
assert_equals(animation.playbackRate, 1, 'playbackRate remains unchanged');
}, 'When reversing throws an exception, the playback rate remains unchanged');
test(function(t) {
var div = createDiv(t);
var animation = div.animate({}, {duration: 100 * MS_PER_SEC,
iterations: Infinity});
animation.currentTime = -200 * MS_PER_SEC;
animation.playbackRate = 0;
try {
animation.reverse();
} catch (e) {
assert_unreached(`Unexpected exception when calling reverse(): ${e}`);
}
}, 'Reversing animation when playbackRate = 0 and currentTime < 0 ' +
'and the target effect end is positive infinity should NOT throw an ' +
'exception');
test(function(t) {
var div = createDiv(t);
var animation = div.animate({}, {duration: 100 * MS_PER_SEC,