mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Update webdriver to 0.51 (#34838)
Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
bcad0d50e9
commit
dd9164f49a
3 changed files with 17 additions and 21 deletions
21
Cargo.lock
generated
21
Cargo.lock
generated
|
@ -957,7 +957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1862,7 +1862,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2383,7 +2383,7 @@ dependencies = [
|
|||
"gobject-sys",
|
||||
"libc",
|
||||
"system-deps",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4048,7 +4048,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.48.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -5888,7 +5888,7 @@ dependencies = [
|
|||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -7153,7 +7153,7 @@ dependencies = [
|
|||
"getrandom",
|
||||
"once_cell",
|
||||
"rustix",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -8158,22 +8158,23 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "webdriver"
|
||||
version = "0.49.0"
|
||||
version = "0.51.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc8773336cf1ad6ffadae7d73fea436e5c4d6345a467292902876cb0f7b72107"
|
||||
checksum = "310ce9d3648c5ff1915ca7dd09c44eabb7eb17f9ff4a6e7e5f4a902c8d1e269f"
|
||||
dependencies = [
|
||||
"base64 0.21.7",
|
||||
"bytes",
|
||||
"cookie 0.16.2",
|
||||
"http",
|
||||
"icu_segmenter",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"thiserror 1.0.69",
|
||||
"time 0.3.36",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"unicode-segmentation",
|
||||
"url",
|
||||
"warp",
|
||||
]
|
||||
|
@ -8444,7 +8445,7 @@ version = "0.1.9"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -148,7 +148,7 @@ unicode-script = "0.5"
|
|||
unicode-segmentation = "1.12.0"
|
||||
url = "2.5"
|
||||
uuid = { version = "1.11.0", features = ["v4"] }
|
||||
webdriver = "0.49.0"
|
||||
webdriver = "0.51.0"
|
||||
webpki-roots = "0.25"
|
||||
webrender = { git = "https://github.com/servo/webrender", branch = "0.65", features = ["capture"] }
|
||||
webrender_api = { git = "https://github.com/servo/webrender", branch = "0.65" }
|
||||
|
|
|
@ -50,7 +50,7 @@ use webdriver::actions::{
|
|||
ActionSequence, PointerDownAction, PointerMoveAction, PointerOrigin, PointerType,
|
||||
PointerUpAction,
|
||||
};
|
||||
use webdriver::capabilities::{Capabilities, CapabilitiesMatching};
|
||||
use webdriver::capabilities::CapabilitiesMatching;
|
||||
use webdriver::command::{
|
||||
ActionsParameters, AddCookieParameters, GetParameters, JavascriptCommandParameters,
|
||||
LocatorParameters, NewSessionParameters, NewWindowParameters, SendKeysParameters,
|
||||
|
@ -477,12 +477,7 @@ impl Handler {
|
|||
parameters: &NewSessionParameters,
|
||||
) -> WebDriverResult<WebDriverResponse> {
|
||||
let mut servo_capabilities = ServoCapabilities::new();
|
||||
let processed_capabilities = match parameters {
|
||||
NewSessionParameters::Legacy(_) => Some(Capabilities::new()),
|
||||
NewSessionParameters::Spec(capabilities) => {
|
||||
capabilities.match_browser(&mut servo_capabilities)?
|
||||
},
|
||||
};
|
||||
let processed_capabilities = parameters.match_browser(&mut servo_capabilities)?;
|
||||
|
||||
if self.session.is_none() {
|
||||
match processed_capabilities {
|
||||
|
@ -979,14 +974,14 @@ impl Handler {
|
|||
) -> WebDriverResult<WebDriverResponse> {
|
||||
use webdriver::common::FrameId;
|
||||
let frame_id = match parameters.id {
|
||||
None => {
|
||||
FrameId::Top => {
|
||||
let session = self.session_mut()?;
|
||||
session.browsing_context_id =
|
||||
BrowsingContextId::from(session.top_level_browsing_context_id);
|
||||
return Ok(WebDriverResponse::Void);
|
||||
},
|
||||
Some(FrameId::Short(ref x)) => WebDriverFrameId::Short(*x),
|
||||
Some(FrameId::Element(ref x)) => WebDriverFrameId::Element(x.to_string()),
|
||||
FrameId::Short(ref x) => WebDriverFrameId::Short(*x),
|
||||
FrameId::Element(ref x) => WebDriverFrameId::Element(x.to_string()),
|
||||
};
|
||||
|
||||
self.switch_to_frame(frame_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue