mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 03:27:15 +02:00
Tests/LibWeb: Handle synchronous iframe processing in CloseWatcher test
If we conform with the HTML specification by processing the iframe synchronously as part of the iframe post connection steps, this test will time out as the load event is fired in the appendChild call. Create the promise for the load event before performing the load event to handle this situation, which also allows the test to pass in chromium.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
d330171be3
commit
633b684d76
Notes:
github-actions[bot]
2026-03-25 13:50:40 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/633b684d766 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8607 Reviewed-by: https://github.com/gmta ✅
@@ -3,9 +3,10 @@
|
||||
<script>
|
||||
promiseTest(async () => {
|
||||
const iframe = document.createElement('iframe');
|
||||
const iframeLoaded = new Promise(resolve => { iframe.onload = resolve; });
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
await new Promise(resolve => iframe.onload = resolve);
|
||||
await iframeLoaded;
|
||||
|
||||
const iframeCloseWatcher = iframe.contentWindow.CloseWatcher;
|
||||
const iframeDOMException = iframe.contentWindow.DOMException;
|
||||
|
||||
Reference in New Issue
Block a user