Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mozilla/geckodriver.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Juang <juangj@gmail.com>2017-04-20 01:36:12 +0300
committerAndreas Tolfsen <ato@mozilla.com>2017-04-20 01:36:12 +0300
commit029b60f44f4b5d886525e1a050fd01f8123ddfc5 (patch)
tree0e3b5c3696c2084e4b93cc9fff96b95a93ff6dcd
parent06249a7b3785b41ec8bd49059b1d6127a894a047 (diff)
Accept "page load" and "pageLoad" in the Marionette response (#656)
-rw-r--r--src/marionette.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/marionette.rs b/src/marionette.rs
index 5c274c7..6b5919a 100644
--- a/src/marionette.rs
+++ b/src/marionette.rs
@@ -557,8 +557,10 @@ impl MarionetteSession {
.as_u64(),
ErrorStatus::UnknownError,
"Failed to interpret script timeout duration as u64");
- let page_load = try_opt!(try_opt!(resp.result
- .find("pageLoad"),
+ // Check for the spec-compliant "pageLoad", but also for "page load",
+ // which was sent by Firefox 52 and earlier.
+ let page_load = try_opt!(try_opt!(resp.result.find("pageLoad")
+ .or(resp.result.find("page load")),
ErrorStatus::UnknownError,
"Missing field: pageLoad")
.as_u64(),