зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1351409 - Remove animationiteration from legacy event listener test, make the transition tests more robust, and re-enable that test. r=jmaher
According to :birtles, it is not guaranteed that animationiteration event will be fired. This event is sample-based rather than event-based, and such behavior has been clarified in CSS Animations Level 2: https://drafts.csswg.org/css-animations-2/#event-dispatch Also, Chromium has the same issue with this test: https://bugs.chromium.org/p/chromium/issues/detail?id=701445 MozReview-Commit-ID: KBCzkGHxbfc --HG-- extra : rebase_source : 0b187471ee7625316ad8c85dc1698cb7099dc887
This commit is contained in:
Родитель
e43d539775
Коммит
66d89ffcfd
|
@ -1,3 +0,0 @@
|
|||
[EventListener-invoke-legacy.html]
|
||||
type: testharness
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1351409
|
|
@ -51,22 +51,16 @@ function runLegacyEventTest(type, legacyType, ctor, setup) {
|
|||
}
|
||||
|
||||
function setupTransition(elem) {
|
||||
elem.style.transition = '';
|
||||
requestAnimationFrame(function() {
|
||||
elem.style.color = 'red';
|
||||
elem.style.transition = 'color 30ms';
|
||||
requestAnimationFrame(function() {
|
||||
getComputedStyle(elem).color;
|
||||
elem.style.color = 'green';
|
||||
});
|
||||
});
|
||||
elem.style.transition = 'color 30ms';
|
||||
}
|
||||
|
||||
function setupAnimation(elem) {
|
||||
elem.style.animation = 'test 30ms 2';
|
||||
elem.style.animation = 'test 30ms';
|
||||
}
|
||||
|
||||
runLegacyEventTest('transitionend', 'webkitTransitionEnd', "TransitionEvent", setupTransition);
|
||||
runLegacyEventTest('animationend', 'webkitAnimationEnd', "AnimationEvent", setupAnimation);
|
||||
runLegacyEventTest('animationiteration', 'webkitAnimationIteration', "AnimationEvent", setupAnimation);
|
||||
runLegacyEventTest('animationstart', 'webkitAnimationStart', "AnimationEvent", setupAnimation);
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче