geckodriver: Accept "page load" and "pageLoad" in the Marionette response (#656)

Source-Repo: https://github.com/mozilla/geckodriver
Source-Revision: 029b60f44f4b5d886525e1a050fd01f8123ddfc5

committer: Andreas Tolfsen <ato@mozilla.com>

--HG--
extra : rebase_source : 01bae43c39d36f9ebfbad81f5017aa6caf23d915
This commit is contained in:
Jason Juang 2017-04-19 23:36:12 +01:00
parent f2f7acb743
commit 05fb17383e

View File

@ -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(),