LibWeb: Make request-animation-frame-order test async
Even though this test worked fine, it does use requestAnimationFrame callbacks, so lets make it async to ensure it doesn't timeout.
This commit is contained in:
parent
328ad9a2f0
commit
c7c7ed780b
1 changed files with 10 additions and 2 deletions
|
|
@ -2,12 +2,20 @@
|
|||
<div id="foo"></div>
|
||||
<script src="include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
asyncTest(done => {
|
||||
let animFrameCallCount = 0;
|
||||
function animFrameCb(i) {
|
||||
println(i);
|
||||
animFrameCallCount++;
|
||||
if (animFrameCallCount === 20)
|
||||
done();
|
||||
}
|
||||
|
||||
for (let i = 0; i < 20; i++) {
|
||||
// FIXME: Workaround for https://github.com/SerenityOS/serenity/issues/23552
|
||||
let x = i;
|
||||
requestAnimationFrame(() => {
|
||||
println(x);
|
||||
animFrameCb(x);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue