mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Tests: Fix flaky test timeout
If the iframe had loaded before the test was executed this would timeout
This commit is contained in:
committed by
Alexander Kalenik
parent
f5e4018b7e
commit
9b4cd4fe62
Notes:
github-actions[bot]
2026-03-12 11:01:41 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/9b4cd4fe629 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8378
@@ -19,21 +19,22 @@
|
||||
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(done => {
|
||||
iframe.addEventListener("load", () => {
|
||||
asyncTest(async done => {
|
||||
if (iframe.contentDocument?.readyState !== "complete")
|
||||
await new Promise(resolve => iframe.addEventListener("load", resolve));
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
const target = iframe.contentDocument.querySelector("#target");
|
||||
const target = iframe.contentDocument.querySelector("#target");
|
||||
|
||||
println(getComputedStyle(target).order);
|
||||
|
||||
for (let height of [1, 2, 3]) {
|
||||
iframe.style.height = `${height}px`;
|
||||
println(getComputedStyle(target).order);
|
||||
}
|
||||
|
||||
for (let height of [1, 2, 3]) {
|
||||
iframe.style.height = `${height}px`;
|
||||
println(getComputedStyle(target).order);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user