Update web-platform-tests to revision 6838f7e5fbddf9c77a93b0e8cd2e27c0fcfed86f

This commit is contained in:
WPT Sync Bot 2020-04-09 08:18:59 +00:00
parent 37023b24f2
commit 17d194dd89
108 changed files with 2614 additions and 114 deletions

View file

@ -0,0 +1,19 @@
"use strict";
/**
* Waits until we have at least one frame rendered, regardless of the engine.
*
* @returns {Promise}
*/
function waitForAtLeastOneFrame() {
return new Promise(resolve => {
// Different web engines work slightly different on this area but waiting
// for two requestAnimationFrames() to happen, one after another, should be
// sufficient to ensure at least one frame has been generated anywhere.
window.requestAnimationFrame(() => {
window.requestAnimationFrame(() => {
resolve();
});
});
});
}