mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
[WebDriver] Unify Cookie related Error types (#37339)
Remove `embedder/webdriver.rs::WebDriverCookieError` and use universal `ErrorStatus` from webdriver crate. This is needed as we might need to send back more universal error such as `NoSuchWindow`. Testing: No behaviour change. Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
parent
96b0973037
commit
4e9993128b
3 changed files with 30 additions and 40 deletions
|
@ -94,7 +94,7 @@ pub enum WebDriverScriptCommand {
|
|||
serialize_with = "::hyper_serde::serialize"
|
||||
)]
|
||||
Cookie<'static>,
|
||||
IpcSender<Result<(), WebDriverCookieError>>,
|
||||
IpcSender<Result<(), ErrorStatus>>,
|
||||
),
|
||||
DeleteCookies(IpcSender<Result<(), ErrorStatus>>),
|
||||
DeleteCookie(String, IpcSender<Result<(), ErrorStatus>>),
|
||||
|
@ -134,8 +134,11 @@ pub enum WebDriverScriptCommand {
|
|||
ElementClick(String, IpcSender<Result<Option<String>, ErrorStatus>>),
|
||||
GetActiveElement(IpcSender<Option<String>>),
|
||||
GetComputedRole(String, IpcSender<Result<Option<String>, ErrorStatus>>),
|
||||
GetCookie(String, IpcSender<Vec<Serde<Cookie<'static>>>>),
|
||||
GetCookies(IpcSender<Vec<Serde<Cookie<'static>>>>),
|
||||
GetCookie(
|
||||
String,
|
||||
IpcSender<Result<Vec<Serde<Cookie<'static>>>, ErrorStatus>>,
|
||||
),
|
||||
GetCookies(IpcSender<Result<Vec<Serde<Cookie<'static>>>, ErrorStatus>>),
|
||||
GetElementAttribute(
|
||||
String,
|
||||
String,
|
||||
|
@ -165,12 +168,6 @@ pub enum WebDriverScriptCommand {
|
|||
WillSendKeys(String, String, bool, IpcSender<Result<bool, ErrorStatus>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum WebDriverCookieError {
|
||||
InvalidDomain,
|
||||
UnableToSetCookie,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub enum WebDriverJSValue {
|
||||
Undefined,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue