1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:08:11 +00:00
serenity/Userland/Libraries/LibWeb/Page
Aliaksandr Kalenik 6f8be44c0e LibWeb+WebContent+headless-browser: Support async text tests
Previously, we used `on_load_finish` to determine when the text test
was completed. This method did not allow testing of async functions
because there was no way to indicate that the runner should wait for
the async call to end.

This change introduces a function in the `internals` object that is
intended to be called when the text test execution is completed. The
text test runner will now ignore `on_load_finish` which means a test
will timeout if this new function is never called.

`test(f)` function in `include.js` has been modified to automatically
terminate a test once `load` event is fired on `window`.
new `asyncTest(f)` function has been introduces. `f` receives function
that will terminate a test as a first argument.

Every test is expected to call either `test()` or `asyncTest()` to
complete. If not, it will remain hanging until a timeout occurs.
2023-09-15 08:52:25 +02:00
..
EditEventHandler.cpp LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
EditEventHandler.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
EventHandler.cpp LibWeb: Partially implement MouseEvent.movementX/movementY 2023-08-30 10:21:30 +02:00
EventHandler.h LibWeb: Partially implement MouseEvent.movementX/movementY 2023-08-30 10:21:30 +02:00
Page.cpp LibWeb: Add Optional<String> overload for Element::set_attribute 2023-09-02 19:23:41 +01:00
Page.h LibWeb+WebContent+headless-browser: Support async text tests 2023-09-15 08:52:25 +02:00