Tests: Synchronize imported tests with the WPT repository

This commit is contained in:
Tim Ledbetter
2025-06-21 15:43:33 +01:00
committed by Alexander Kalenik
parent 11e5cd5048
commit 689dff3ee8
Notes: github-actions[bot] 2025-06-22 21:52:43 +00:00
155 changed files with 1485 additions and 750 deletions

View File

@@ -323,4 +323,17 @@ root.supportsStartingStyle = () => {
return sheet.cssRules.length == 1;
};
/**
* Waits for a 'transitionend' event to fire on the given element.
*
* @param element The DOM element to listen for the transitionend event on.
* @returns {Promise<void>} A promise that resolves when the transitionend event is fired.
*/
root.waitForTransitionEnd = function(element) {
return new Promise(resolve => {
element.addEventListener('transitionend', resolve, { once: true });
});
};
})(window);