mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update web-platform-tests to revision 6838f7e5fbddf9c77a93b0e8cd2e27c0fcfed86f
This commit is contained in:
parent
37023b24f2
commit
17d194dd89
108 changed files with 2614 additions and 114 deletions
19
tests/wpt/web-platform-tests/common/rendering-utils.js
Normal file
19
tests/wpt/web-platform-tests/common/rendering-utils.js
Normal 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();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue