ladybird/Userland/Libraries/LibWeb/WebDriver
Timothy Flynn c2cf65adac WebDriver: Handle script execution results without spinning event loops
We currently spin the platform event loop while awaiting scripts to
complete. This causes WebContent to hang if another component is also
spinning the event loop. The particular example that instigated this
patch was the navigable's navigation loop (which spins until the fetch
process is complete), triggered by a form submission to an iframe.

So instead of spinning, we now return immediately from the script
executors, after setting up listeners for either the script's promise to
be resolved or for a timeout. The HTTP request to WebDriver must finish
synchronously though, so now the WebDriver process spins its event loop
until WebContent signals that the script completed. This should be ok -
the WebDriver process isn't expected to be doing anything else in the
meantime.

Also, as a consequence of these changes, we now actually handle time
outs. We were previously creating the timeout timer, but not starting
it.
2024-09-13 10:11:21 -04:00
..
Capabilities.cpp Everywhere: Convert from_string_view -> from_string_literal where static 2024-09-11 10:59:04 +01:00
Capabilities.h LibWeb+WebDriver: Support running headless WebDriver sessions 2022-11-24 00:10:56 +00:00
Client.cpp WebDriver: Add boilerplate for endpoint 15.7 Perform Actions 2024-09-09 14:11:23 +01:00
Client.h WebDriver: Add boilerplate for endpoint 15.7 Perform Actions 2024-09-09 14:11:23 +01:00
Contexts.cpp LibWeb+WebContent: Convert WebDriver to choose a navigable AO 2024-02-05 08:05:48 -07:00
Contexts.h LibWeb/WebDriver: Handle WindowProxy in internal_json_clone_algorithm() 2023-04-20 14:41:31 -04:00
ElementLocationStrategies.cpp LibWeb: Implement the element location strategies in Web::WebDriver 2022-11-10 13:10:16 +00:00
ElementLocationStrategies.h Everywhere: Remove unused includes of AK/Array.h 2023-01-02 20:08:35 +00:00
Error.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Error.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ExecuteScript.cpp WebDriver: Handle script execution results without spinning event loops 2024-09-13 10:11:21 -04:00
ExecuteScript.h WebDriver: Handle script execution results without spinning event loops 2024-09-13 10:11:21 -04:00
Response.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Response.h LibWeb: Mark Web::WebDriver::Response as [[nodiscard]] 2023-03-07 18:16:35 +00:00
Screenshot.cpp LibWeb: Make requestAnimationFrame() callback IDs sequential 2024-08-05 09:12:07 +02:00
Screenshot.h LibWeb: Implement screenshot painting inside Web::WebDriver 2022-11-11 11:36:07 +00:00
TimeoutsConfiguration.cpp WebDriver: Dont assume the pageLoad is an i64 2024-05-30 11:46:02 -04:00
TimeoutsConfiguration.h LibWeb+WebDriver: Move the timeouts configuration object to LibWeb 2022-11-11 22:03:23 +00:00