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
deleted file mode 100644
--- a/testing/web-platform/meta/dom/events/EventListener-invoke-legacy.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[EventListener-invoke-legacy.html]
- type: testharness
- disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1351409
--- a/testing/web-platform/tests/dom/events/EventListener-invoke-legacy.html
+++ b/testing/web-platform/tests/dom/events/EventListener-invoke-legacy.html
@@ -46,27 +46,21 @@ function runLegacyEventTest(type, legacy
elem.dispatchEvent(new window[ctor](type));
t.done();
}));
setup(elem);
}, "Legacy listener of " + type);
}
function setupTransition(elem) {
- elem.style.transition = '';
- requestAnimationFrame(function() {
- elem.style.color = 'red';
- elem.style.transition = 'color 30ms';
- requestAnimationFrame(function() {
- elem.style.color = 'green';
- });
- });
+ 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>