Browse Source

Tests/LibWeb: Wait until document fully loaded before simulating click

This makes the `form-image-submission.html` test pass more reliably.
Tim Ledbetter 1 year ago
parent
commit
2fed064791

+ 0 - 1
Tests/LibWeb/TestConfig.ini

@@ -1,7 +1,6 @@
 [Skipped]
 Text/input/Crypto/SubtleCrypto-exportKey.html
 Text/input/Crypto/SubtleCrypto-generateKey.html
-Text/input/HTML/form-image-submission.html
 Text/input/WebAnimations/misc/DocumentTimeline.html
 Text/input/Worker/Worker-echo.html
 Text/input/window-scrollTo.html

+ 1 - 1
Tests/LibWeb/Text/input/HTML/form-image-submission.html

@@ -28,7 +28,7 @@
             done();
         });
 
-        image.addEventListener("load", () => {
+        window.addEventListener("load", () => {
             const imageRect = image.getBoundingClientRect();
             internals.click(imageRect.x + 10, imageRect.y + 20);
         });