1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

WebContent+WebDriver: Set the navigator.webdriver flag from WebDriver

This moves setting the navigator.webdriver flag from after WebContent
creates the WebDriver connection, to its own IPC to be triggered from
WebDriver. This is closer to the spec, but mostly serves as an easy
test to validate the connection.
This commit is contained in:
Timothy Flynn 2022-11-08 10:42:12 -05:00 committed by Tim Flynn
parent 50ae1ad18a
commit f7c212a19d
8 changed files with 17 additions and 10 deletions

View file

@ -74,8 +74,6 @@ void ConnectionFromClient::connect_to_webdriver(String const& webdriver_ipc_path
// FIXME: Propogate this error back to the browser.
if (auto result = m_page_host->connect_to_webdriver(webdriver_ipc_path); result.is_error())
dbgln("Unable to connect to the WebDriver process: {}", result.error());
else
set_is_webdriver_active(true);
}
void ConnectionFromClient::update_system_theme(Core::AnonymousBuffer const& theme_buffer)
@ -801,11 +799,6 @@ void ConnectionFromClient::set_is_scripting_enabled(bool is_scripting_enabled)
m_page_host->set_is_scripting_enabled(is_scripting_enabled);
}
void ConnectionFromClient::set_is_webdriver_active(bool is_webdriver_active)
{
m_page_host->set_is_webdriver_active(is_webdriver_active);
}
void ConnectionFromClient::set_window_position(Gfx::IntPoint const& position)
{
m_page_host->set_window_position(position);