diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-03-16 08:50:22 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-16 15:02:41 +0000 |
commit | 700ad6bf350f9e74044c015157f8ad7072c7f04c (patch) | |
tree | 6d9957d55b42f72a7b1122ab286c34fdd8922cd0 /Userland/Services/WebContent/PageHost.cpp | |
parent | 3a7257c9fe24f1c21a744a76e97f3ee7a2f42f7e (diff) | |
download | serenity-700ad6bf350f9e74044c015157f8ad7072c7f04c.zip |
WebContent+LibWebView: Consolidate the way browsers connect to WebDriver
Currently, on Serenity, we connect to WebDriver from the browser-side of
the WebContent connection for both Browser and headless-browser.
On Lagom, we connect from within the WebContent process itself, signaled
by a command line flag.
This patch changes Lagom browsers to connect to WebDriver the same way
that Serenity browsers do. This will ensure we can do other initializers
in the same order across all platforms and browsers.
Diffstat (limited to 'Userland/Services/WebContent/PageHost.cpp')
-rw-r--r-- | Userland/Services/WebContent/PageHost.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp index ae30fd7cf2..582d731735 100644 --- a/Userland/Services/WebContent/PageHost.cpp +++ b/Userland/Services/WebContent/PageHost.cpp @@ -93,6 +93,10 @@ ErrorOr<void> PageHost::connect_to_webdriver(DeprecatedString const& webdriver_i { VERIFY(!m_webdriver); m_webdriver = TRY(WebDriverConnection::connect(*this, webdriver_ipc_path)); + + if (on_webdriver_connection) + on_webdriver_connection(*m_webdriver); + return {}; } |