From 6a55370401f745b9faae709e75ab1af9038d9430 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 11 Nov 2022 14:30:48 -0500 Subject: [PATCH] WebContent: Pass the script timeout into the WebDriver script executor This was dropped in 0b9803d and 31469ee before the timeouts object was avaiable in WebContent. --- Userland/Services/WebContent/WebDriverConnection.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index 93d595d16f..e42a30206b 100644 --- a/Userland/Services/WebContent/WebDriverConnection.cpp +++ b/Userland/Services/WebContent/WebDriverConnection.cpp @@ -900,8 +900,7 @@ Messages::WebDriverClient::ExecuteScriptResponse WebDriverConnection::execute_sc // FIXME: 3. Handle any user prompts, and return its value if it is an error. // 4., 5.1-5.3. - // FIXME: Move timeouts from WebDriver to WebContent and pass the script timeout through here. - auto result = Web::WebDriver::execute_script(m_page_host.page(), body, move(arguments), {}); + auto result = Web::WebDriver::execute_script(m_page_host.page(), body, move(arguments), m_timeouts_configuration.script_timeout); dbgln_if(WEBDRIVER_DEBUG, "Executing script returned: {}", result.value); switch (result.type) { @@ -932,8 +931,7 @@ Messages::WebDriverClient::ExecuteAsyncScriptResponse WebDriverConnection::execu // FIXME: 3. Handle any user prompts, and return its value if it is an error. // 4., 5.1-5.11. - // FIXME: Move timeouts from WebDriver to WebContent and pass the script timeout through here. - auto result = Web::WebDriver::execute_async_script(m_page_host.page(), body, move(arguments), {}); + auto result = Web::WebDriver::execute_async_script(m_page_host.page(), body, move(arguments), m_timeouts_configuration.script_timeout); dbgln_if(WEBDRIVER_DEBUG, "Executing async script returned: {}", result.value); switch (result.type) {