mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
Basic webdriver support to servoshell on ohos (#38386)
Adding basic webdriver support to servoshell on ohos and basic communication between the ohos device and script. Testing: Manual testing and tracing logs Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
This commit is contained in:
parent
f5b631e270
commit
2e2bfc6067
9 changed files with 113 additions and 17 deletions
|
@ -11,7 +11,7 @@
|
|||
pub mod input_events;
|
||||
pub mod resources;
|
||||
pub mod user_content_manager;
|
||||
mod webdriver;
|
||||
pub mod webdriver;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::ffi::c_void;
|
||||
|
|
|
@ -23,7 +23,7 @@ use webdriver::common::{WebElement, WebFrame, WebWindow};
|
|||
use webdriver::error::ErrorStatus;
|
||||
use webrender_api::units::DevicePixel;
|
||||
|
||||
use crate::{MouseButton, MouseButtonAction};
|
||||
use crate::{FocusId, MouseButton, MouseButtonAction, TraversalId};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
pub struct WebDriverMessageId(pub usize);
|
||||
|
@ -301,3 +301,13 @@ pub enum WebDriverLoadStatus {
|
|||
// Navigation is blocked by a user prompt
|
||||
Blocked,
|
||||
}
|
||||
|
||||
/// A collection of [`IpcSender`]s that are used to asynchronously communicate
|
||||
/// to a WebDriver server with information about application state.
|
||||
#[derive(Clone, Default)]
|
||||
pub struct WebDriverSenders {
|
||||
pub load_status_senders: HashMap<WebViewId, IpcSender<WebDriverLoadStatus>>,
|
||||
pub script_evaluation_interrupt_sender: Option<IpcSender<WebDriverJSResult>>,
|
||||
pub pending_traversals: HashMap<TraversalId, IpcSender<WebDriverLoadStatus>>,
|
||||
pub pending_focus: HashMap<FocusId, IpcSender<bool>>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue