mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
Similar to script execution, this spins the WebDriver process until the action is complete (rather than spinning the WebContent process, which we've seen result in deadlocks). (cherry picked from commit 709deeb482a6433abbcb194551788bc5409166f4)
36 lines
804 B
C++
36 lines
804 B
C++
/*
|
|
* Copyright (c) 2022-2024, Tim Flynn <[email protected]>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <WebDriver/Client.h>
|
|
#include <WebDriver/WebContentConnection.h>
|
|
|
|
namespace WebDriver {
|
|
|
|
WebContentConnection::WebContentConnection(NonnullOwnPtr<Core::LocalSocket> socket)
|
|
: IPC::ConnectionFromClient<WebDriverClientEndpoint, WebDriverServerEndpoint>(*this, move(socket), 1)
|
|
{
|
|
}
|
|
|
|
void WebContentConnection::die()
|
|
{
|
|
if (on_close)
|
|
on_close();
|
|
}
|
|
|
|
void WebContentConnection::script_executed(Web::WebDriver::Response const& response)
|
|
{
|
|
if (on_script_executed)
|
|
on_script_executed(response);
|
|
}
|
|
|
|
void WebContentConnection::actions_performed(Web::WebDriver::Response const& response)
|
|
{
|
|
if (on_actions_performed)
|
|
on_actions_performed(response);
|
|
}
|
|
|
|
}
|