mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move webdriver actions commands to servoshell (#37669)
Move webdriver actions commands to servoshell. Testing: Test with webdriver enable in the CI [Test result 1](https://github.com/longvatrong111/servo/actions/runs/15875355256) [Test result 2](https://github.com/longvatrong111/servo/actions/runs/15875356595) [Test result 3](https://github.com/longvatrong111/servo/actions/runs/15875361886) Fixes: https://github.com/servo/servo/issues/37370 Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
parent
9bd8d4f026
commit
940eff9497
12 changed files with 126 additions and 208 deletions
|
@ -30,6 +30,9 @@ pub struct WebDriverMessageId(pub usize);
|
|||
/// Messages to the constellation originating from the WebDriver server.
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum WebDriverCommandMsg {
|
||||
/// Used in the initialization of the WebDriver server to set the sender for sending responses
|
||||
/// back to the WebDriver client. It is set to constellation for now
|
||||
SetWebDriverResponseSender(IpcSender<WebDriverCommandResponse>),
|
||||
/// Get the window size.
|
||||
GetWindowRect(WebViewId, IpcSender<DeviceIntRect>),
|
||||
/// Get the viewport size.
|
||||
|
@ -53,7 +56,6 @@ pub enum WebDriverCommandMsg {
|
|||
KeyboardEvent,
|
||||
// Should never be None.
|
||||
Option<WebDriverMessageId>,
|
||||
IpcSender<WebDriverCommandResponse>,
|
||||
),
|
||||
/// Act as if the mouse was clicked in the browsing context with the given ID.
|
||||
MouseButtonAction(
|
||||
|
@ -64,7 +66,6 @@ pub enum WebDriverCommandMsg {
|
|||
f32,
|
||||
// Should never be None.
|
||||
Option<WebDriverMessageId>,
|
||||
IpcSender<WebDriverCommandResponse>,
|
||||
),
|
||||
/// Act as if the mouse was moved in the browsing context with the given ID.
|
||||
MouseMoveAction(
|
||||
|
@ -74,7 +75,6 @@ pub enum WebDriverCommandMsg {
|
|||
// None if it's not the last `perform_pointer_move` since we only
|
||||
// expect one response from constellation for each tick actions.
|
||||
Option<WebDriverMessageId>,
|
||||
IpcSender<WebDriverCommandResponse>,
|
||||
),
|
||||
/// Act as if the mouse wheel is scrolled in the browsing context given the given ID.
|
||||
WheelScrollAction(
|
||||
|
@ -86,7 +86,6 @@ pub enum WebDriverCommandMsg {
|
|||
// None if it's not the last `perform_wheel_scroll` since we only
|
||||
// expect one response from constellation for each tick actions.
|
||||
Option<WebDriverMessageId>,
|
||||
IpcSender<WebDriverCommandResponse>,
|
||||
),
|
||||
/// Set the window size.
|
||||
SetWindowSize(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue