зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1212720 - Part 4: Remove all cancelAllAnimationsOnEnd. It is not needed any more. r=bbirtles
--HG-- extra : histedit_source : 1470ef2dfe10559b5761c6eb6a384a610d883718
This commit is contained in:
Родитель
c1f10eb765
Коммит
4d993b1ed3
|
@ -145,8 +145,6 @@ test(function(t) {
|
||||||
}, 'Order of CSS Animations - across and within elements');
|
}, 'Order of CSS Animations - across and within elements');
|
||||||
|
|
||||||
test(function(t) {
|
test(function(t) {
|
||||||
cancelAllAnimationsOnEnd(t);
|
|
||||||
|
|
||||||
var div = addDiv(t, { style: 'animation: animLeft 100s, animTop 100s' });
|
var div = addDiv(t, { style: 'animation: animLeft 100s, animTop 100s' });
|
||||||
var animLeft = document.getAnimations()[0];
|
var animLeft = document.getAnimations()[0];
|
||||||
assert_equals(animLeft.animationName, 'animLeft',
|
assert_equals(animLeft.animationName, 'animLeft',
|
||||||
|
@ -165,8 +163,6 @@ test(function(t) {
|
||||||
}, 'Order of CSS Animations - markup-bound vs free animations');
|
}, 'Order of CSS Animations - markup-bound vs free animations');
|
||||||
|
|
||||||
test(function(t) {
|
test(function(t) {
|
||||||
cancelAllAnimationsOnEnd(t);
|
|
||||||
|
|
||||||
var div = addDiv(t, { style: 'animation: animLeft 100s, animTop 100s' });
|
var div = addDiv(t, { style: 'animation: animLeft 100s, animTop 100s' });
|
||||||
var animLeft = document.getAnimations()[0];
|
var animLeft = document.getAnimations()[0];
|
||||||
var animTop = document.getAnimations()[1];
|
var animTop = document.getAnimations()[1];
|
||||||
|
@ -239,8 +235,6 @@ test(function(t) {
|
||||||
}, 'CSS Animations cancelled via the API are not returned');
|
}, 'CSS Animations cancelled via the API are not returned');
|
||||||
|
|
||||||
test(function(t) {
|
test(function(t) {
|
||||||
cancelAllAnimationsOnEnd(t);
|
|
||||||
|
|
||||||
var div = addDiv(t, { style: 'animation: animLeft 100s' });
|
var div = addDiv(t, { style: 'animation: animLeft 100s' });
|
||||||
var anim = div.getAnimations()[0];
|
var anim = div.getAnimations()[0];
|
||||||
anim.cancel();
|
anim.cancel();
|
||||||
|
|
|
@ -29,18 +29,6 @@ function addDiv(t, attrs) {
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Some tests cause animations to continue to exist even after their target
|
|
||||||
* element has been removed from the document tree. To ensure that these
|
|
||||||
* animations do not impact other tests we should cancel them when the test
|
|
||||||
* is complete.
|
|
||||||
*/
|
|
||||||
function cancelAllAnimationsOnEnd(t) {
|
|
||||||
t.add_cleanup(function() {
|
|
||||||
document.getAnimations().forEach(animation => animation.cancel());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Promise wrapper for requestAnimationFrame.
|
* Promise wrapper for requestAnimationFrame.
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче