diff options
author | michaelgrigoryan25 <56165400+michaelgrigoryan25@users.noreply.github.com> | 2023-05-18 13:48:19 +0400 |
---|---|---|
committer | michaelgrigoryan25 <56165400+michaelgrigoryan25@users.noreply.github.com> | 2023-05-18 13:48:19 +0400 |
commit | 4aa8a1c41895550e43dcbce6442c9f4b6163b9b7 (patch) | |
tree | 66d3a1499af945b65925b5f4d3a4a317aee9b4b7 /components/webdriver_server | |
parent | c7f8a6ecb5e55db86b0524bf7bcbe7cd842b1e9f (diff) | |
download | servo-4aa8a1c41895550e43dcbce6442c9f4b6163b9b7.tar.gz servo-4aa8a1c41895550e43dcbce6442c9f4b6163b9b7.zip |
Update: Bumped webdriver version to 0.48
Diffstat (limited to 'components/webdriver_server')
-rw-r--r-- | components/webdriver_server/actions.rs | 8 | ||||
-rw-r--r-- | components/webdriver_server/lib.rs | 18 |
2 files changed, 19 insertions, 7 deletions
diff --git a/components/webdriver_server/actions.rs b/components/webdriver_server/actions.rs index 4fae56b7cee..af08ac1acc8 100644 --- a/components/webdriver_server/actions.rs +++ b/components/webdriver_server/actions.rs @@ -77,6 +77,7 @@ fn compute_tick_duration(tick_actions: &ActionSequence) -> u64 { } }, ActionsType::Key { actions: _ } => (), + ActionsType::Wheel { actions } => todo!("Not implemented."), } duration } @@ -188,6 +189,7 @@ impl Handler { } } }, + ActionsType::Wheel { actions } => todo!("Not implemented."), } Ok(()) @@ -282,6 +284,7 @@ impl Handler { actions: vec![PointerActionItem::Pointer(PointerAction::Up( PointerUpAction { button: action.button, + ..Default::default() }, ))], }, @@ -328,6 +331,7 @@ impl Handler { actions: vec![PointerActionItem::Pointer(PointerAction::Down( PointerDownAction { button: action.button, + ..Default::default() }, ))], }, @@ -356,8 +360,8 @@ impl Handler { let tick_start = Instant::now(); // Steps 1 - 2 - let x_offset = action.x.unwrap_or(0); - let y_offset = action.y.unwrap_or(0); + let x_offset = action.x; + let y_offset = action.y; // Steps 3 - 4 let (start_x, start_y) = match self diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 8712fd9c903..49011af3283 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -115,8 +115,9 @@ pub fn start_server(port: u16, constellation_chan: Sender<ConstellationMsg>) { .spawn(move || { let address = SocketAddrV4::new("0.0.0.0".parse().unwrap(), port); match server::start( - "localhost".to_owned(), SocketAddr::V4(address), + vec![], + vec![], handler, extension_routes(), ) { @@ -1510,15 +1511,22 @@ impl Handler { let pointer_move_action = PointerMoveAction { duration: None, origin: PointerOrigin::Element(WebElement(element_id)), - x: Some(0), - y: Some(0), + x: 0, + y: 0, + ..Default::default() }; // Steps 8.7 - 8.8 - let pointer_down_action = PointerDownAction { button: 1 }; + let pointer_down_action = PointerDownAction { + button: 1, + ..Default::default() + }; // Steps 8.9 - 8.10 - let pointer_up_action = PointerUpAction { button: 1 }; + let pointer_up_action = PointerUpAction { + button: 1, + ..Default::default() + }; // Step 8.11 if let Err(error) = |