Update web-platform-tests to revision 4688078c2cc6e81651b220f3c1944d956f63046b

This commit is contained in:
WPT Sync Bot 2019-04-05 21:41:37 -04:00
parent e7b65c42c4
commit ce9f8f32f1
53 changed files with 1900 additions and 88 deletions

View file

@ -165,19 +165,30 @@ promise_test(async () => {
const elem = document.createElement(localName);
document.body.appendChild(elem);
elem.disabled = true;
const eventPromises = [
"animationstart",
"animationiteration",
"animationend",
].map(eventType => {
return new Promise(r => {
elem.addEventListener(eventType, r, { once: true });
const animationStartPromise = new Promise(r => {
elem.addEventListener("animationstart", () => {
// Seek to the second iteration to trigger the animationiteration event
elem.style.animationDelay = "-100s"
r();
});
});
elem.style.animation = "fade .1s 2";
const animationIterationPromise = new Promise(r => {
elem.addEventListener("animationiteration", ()=>{
elem.style.animationDelay = "-200s"
r();
});
});
const animationEndPromise = new Promise(r => {
elem.addEventListener("animationend", r);
});
elem.style.animation = "fade 100s 2";
elem.classList.add("animate");
// All the events fire...
await Promise.all(eventPromises);
await Promise.all([
animationStartPromise,
animationIterationPromise,
animationEndPromise,
]);
elem.remove();
}
}, "CSS Animation animationstart, animationiteration, animationend fire on disabled form elements");

View file

@ -98,7 +98,7 @@ async_test(function() {
results.push(3)
}), true)
b.dispatchEvent(new Event("x"))
assert_array_equals(results, [1, 2, 3])
assert_array_equals(results, [1, 3, 2])
this.done()
}, "Event listeners should be called in order of addition")
}, "Capturing event listeners should be called before non-capturing ones")
</script>