mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
Browser+WebContent+WebDriver: Move Execute Async Script to WebContent
With this, WebDriverEndpoints is unused and removed :^)
This commit is contained in:
parent
0b9803dc93
commit
31469ee45a
17 changed files with 35 additions and 161 deletions
|
@ -58,21 +58,6 @@ void WebDriverConnection::forward()
|
|||
browser_window->active_tab().go_forward();
|
||||
}
|
||||
|
||||
Messages::WebDriverSessionClient::ExecuteScriptResponse WebDriverConnection::execute_script(String const& body, Vector<String> const& json_arguments, Optional<u64> const& timeout, bool async)
|
||||
{
|
||||
dbgln("WebDriverConnection: execute_script");
|
||||
if (auto browser_window = m_browser_window.strong_ref()) {
|
||||
auto& tab = browser_window->active_tab();
|
||||
if (tab.webdriver_endpoints().on_execute_script) {
|
||||
auto response = tab.webdriver_endpoints().on_execute_script(body, json_arguments, timeout, async);
|
||||
// WebContentServer's and WebDriverSessionClient's ExecuteScriptResponse have an identical
|
||||
// structure but are distinct types, so we have to convert here.
|
||||
return { response.result_type(), response.json_result() };
|
||||
}
|
||||
}
|
||||
return { {} };
|
||||
}
|
||||
|
||||
Messages::WebDriverSessionClient::GetAllCookiesResponse WebDriverConnection::get_all_cookies()
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: get_cookies");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue