mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Update web-platform-tests to revision 4688078c2cc6e81651b220f3c1944d956f63046b
This commit is contained in:
parent
e7b65c42c4
commit
ce9f8f32f1
53 changed files with 1900 additions and 88 deletions
|
@ -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");
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue