aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-09-07 12:57:24 -0500
committerGitHub <noreply@github.com>2016-09-07 12:57:24 -0500
commit5b0a1990d5fff645811f4c70d2a515e85fc2fd20 (patch)
tree161bce138d9e2bd295f9aae4cd3478b91c84fb66
parentdd33be45485fefd148759c77462c484157026055 (diff)
parent8a4a90a42413e4d9119d74c020d85b2bcf12afbf (diff)
downloadservo-5b0a1990d5fff645811f4c70d2a515e85fc2fd20.tar.gz
servo-5b0a1990d5fff645811f4c70d2a515e85fc2fd20.zip
Auto merge of #13186 - andreastt:webdriver-0.14, r=SimonSapin,larsberg
Update webdriver-rust library to 0.14 <!-- Please describe your changes on the following line: --> This updates the _webdriver-rust_ library to 0.14 and makes the necessary API changes to make it compile with Servo. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because it is a library upgrade <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13186) <!-- Reviewable:end -->
-rw-r--r--components/servo/Cargo.lock8
-rw-r--r--components/webdriver_server/Cargo.toml2
-rw-r--r--components/webdriver_server/lib.rs18
-rw-r--r--ports/cef/Cargo.lock8
4 files changed, 20 insertions, 16 deletions
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index b84d1af3d16..258d8891f74 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -2559,13 +2559,15 @@ dependencies = [
[[package]]
name = "webdriver"
-version = "0.9.0"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2586,7 +2588,7 @@ dependencies = [
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "webdriver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webdriver 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2923,7 +2925,7 @@ dependencies = [
"checksum wayland-scanner 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "5a1869370d6bafcbabae8724511d803f4e209a70e94ad94a4249269534364f66"
"checksum wayland-sys 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9633f7fe5de56544215f82eaf1b76bf1b584becf7f08b58cbef4c2c7d10e803a"
"checksum wayland-window 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "309b69d3a863c9c21422d889fb7d98cf02f8a2ca054960a49243ce5b67ad884c"
-"checksum webdriver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f3bb9a2d4c6f2e7dee80456f745250cfb8fca46e6510fd8c386cc49d046a5302"
+"checksum webdriver 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2d66e90672022ced375134329c57be4db228b19b120b97b744a469c381be06"
"checksum webrender 0.5.1 (git+https://github.com/servo/webrender)" = "<none>"
"checksum webrender_traits 0.5.1 (git+https://github.com/servo/webrender)" = "<none>"
"checksum websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a1a6ea5ed0367f32eb3d94dcc58859ef4294b5f75ba983dbf56ac314af45d"
diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml
index 9106ceefe06..b2530adcd6f 100644
--- a/components/webdriver_server/Cargo.toml
+++ b/components/webdriver_server/Cargo.toml
@@ -23,5 +23,5 @@ script_traits = {path = "../script_traits"}
url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"}
uuid = { version = "0.3.1", features = ["v4"] }
-webdriver = "0.9"
+webdriver = "0.14"
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs
index ed38d1933a9..f1460f1540d 100644
--- a/components/webdriver_server/lib.rs
+++ b/components/webdriver_server/lib.rs
@@ -15,6 +15,8 @@ extern crate euclid;
extern crate hyper;
extern crate image;
extern crate ipc_channel;
+#[macro_use]
+extern crate log;
extern crate msg;
extern crate regex;
extern crate rustc_serialize;
@@ -78,10 +80,6 @@ fn cookie_msg_to_cookie(cookie: cookie_rs::Cookie) -> Cookie {
Some(time) => Nullable::Value(Date::new(time.to_timespec().sec as u64)),
None => Nullable::Null
},
- maxAge: match cookie.max_age {
- Some(time) => Nullable::Value(Date::new(time)),
- None => Nullable::Null
- },
secure: cookie.secure,
httpOnly: cookie.httponly,
}
@@ -91,8 +89,10 @@ pub fn start_server(port: u16, constellation_chan: Sender<ConstellationMsg>) {
let handler = Handler::new(constellation_chan);
spawn_named("WebdriverHttpServer".to_owned(), move || {
let address = SocketAddrV4::new("0.0.0.0".parse().unwrap(), port);
- server::start(SocketAddr::V4(address), handler,
- extension_routes());
+ match server::start(SocketAddr::V4(address), handler, extension_routes()) {
+ Ok(listening) => info!("WebDriver server listening on {}", listening.socket),
+ Err(_) => panic!("Unable to start WebDriver HTTPD server"),
+ }
});
}
@@ -847,18 +847,18 @@ impl Handler {
impl WebDriverHandler<ServoExtensionRoute> for Handler {
fn handle_command(&mut self,
_session: &Option<Session>,
- msg: &WebDriverMessage<ServoExtensionRoute>) -> WebDriverResult<WebDriverResponse> {
+ msg: WebDriverMessage<ServoExtensionRoute>) -> WebDriverResult<WebDriverResponse> {
// Unless we are trying to create a new session, we need to ensure that a
// session has previously been created
match msg.command {
- WebDriverCommand::NewSession => {},
+ WebDriverCommand::NewSession(_) => {},
_ => {
try!(self.session());
}
}
match msg.command {
- WebDriverCommand::NewSession => self.handle_new_session(),
+ WebDriverCommand::NewSession(_) => self.handle_new_session(),
WebDriverCommand::DeleteSession => self.handle_delete_session(),
WebDriverCommand::AddCookie(ref parameters) => self.handle_add_cookie(parameters),
WebDriverCommand::Get(ref parameters) => self.handle_get(parameters),
diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock
index 7418cf12d0d..8fe77c4de7c 100644
--- a/ports/cef/Cargo.lock
+++ b/ports/cef/Cargo.lock
@@ -2419,13 +2419,15 @@ dependencies = [
[[package]]
name = "webdriver"
-version = "0.9.0"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2446,7 +2448,7 @@ dependencies = [
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "webdriver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webdriver 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2777,7 +2779,7 @@ dependencies = [
"checksum wayland-scanner 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "5a1869370d6bafcbabae8724511d803f4e209a70e94ad94a4249269534364f66"
"checksum wayland-sys 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9633f7fe5de56544215f82eaf1b76bf1b584becf7f08b58cbef4c2c7d10e803a"
"checksum wayland-window 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "309b69d3a863c9c21422d889fb7d98cf02f8a2ca054960a49243ce5b67ad884c"
-"checksum webdriver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f3bb9a2d4c6f2e7dee80456f745250cfb8fca46e6510fd8c386cc49d046a5302"
+"checksum webdriver 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2d66e90672022ced375134329c57be4db228b19b120b97b744a469c381be06"
"checksum webrender 0.5.1 (git+https://github.com/servo/webrender)" = "<none>"
"checksum webrender_traits 0.5.1 (git+https://github.com/servo/webrender)" = "<none>"
"checksum websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a1a6ea5ed0367f32eb3d94dcc58859ef4294b5f75ba983dbf56ac314af45d"