1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:37:34 +00:00

Ladybird: Implement WebDriver for Ladybird :^)

This adds a WebDriver binary for Ladybird to make use of Serenity's
WebDriver implementation. This has to use the same IPC socket handling
that was used to make WebContent work out-of-process. Besides that, we
are able to reuse almost everything from Serenity.
This commit is contained in:
Timothy Flynn 2022-11-14 12:09:14 -05:00 committed by Andrew Kaster
parent 54321f49ad
commit 9e0db602ca
6 changed files with 238 additions and 2 deletions

View file

@ -587,7 +587,11 @@ void WebContentView::create_client()
MUST(Core::System::close(ui_fd_passing_fd));
MUST(Core::System::close(ui_fd));
auto takeover_string = String::formatted("WebContent:{}", wc_fd);
String takeover_string;
if (auto* socket_takeover = getenv("SOCKET_TAKEOVER"))
takeover_string = String::formatted("{} WebContent:{}", socket_takeover, wc_fd);
else
takeover_string = String::formatted("WebContent:{}", wc_fd);
MUST(Core::System::setenv("SOCKET_TAKEOVER"sv, takeover_string, true));
auto webcontent_fd_passing_socket_string = String::number(wc_fd_passing_fd);