The Content-Type header contains the correct MIME type, but the
charset option is "utf8" and invalid: it should be "utf-8".
Differential Revision: https://phabricator.services.mozilla.com/D12116
This emits a warning when the webdriver library reverts to using the
legacy Selenium-styled capabilities negotiation for new sessions.
It provides a helpful link which will explain to users how to update.
Differential Revision: https://phabricator.services.mozilla.com/D7305
The refactoring of the webdriver crate to use Serde (bug 1396821)
caused this regression. By instructing Serde to correctly rename
both properties fixes it.
Differential Revision: https://phabricator.services.mozilla.com/D7079
The rules in the .gitignore file are duplicated by the root-level
.gitignore file, and the .hgignore file does not take effect because
hg does not subdirectory ignore files.
DONTBUILD
To keep backward compatibility, the legacy "ELEMENT" key for an
instance of PointerOrigin has to be supported, but ignored.
This workaround can be removed once legacy support gets dropped
from geckodriver.
Instead of making explicit calls to iterator protocol methods such as
x.iter() or x.into_iter(), we can loop over references to collections.
This is considered better style.
We clone merged_capabilities in the CapabilitiesMatching implementation
for SpecNewSessionParameters::match_browser using x.map(|x| x.clone()),
but this can be simplified to x.cloned().
In some places we pass variables by value unnecessarily. In these
cases it would be more memory efficient to pass a reference so that
we avoid copying.
Instead of using a catch-all that ignores the error cause, we can
print the cause as part of the panic.
Eventually the error handling in this function should be fixed to
not panic at all, obviously.
Whilst it is logically correct to use 408 for the
ErrorStatus::ScriptTimeout and ::Timeout errors, it
causes a collision with HTTP semantics implement in HTTP clients.
To support Keep-Alive we allow retries in HTTP clients and if a
client sees code 408 it thinks that the server has gone away and
retries the request.
This causes WebDriverCommand::ExecuteScript, ::Get, and ::Refresh
commands to be sent twice with some HTTP clients.
This is a backwards incompatible change to WebDriver in order to
not break HTTP/1.1 Keep-Alive.
The patch switches the serialization and deserialization of data
structures from the rustc_serialize crate to serde. By doing that
all the custom code for serialization and deserialization can be
removed in favor of serde's automatically derived serializers and
deserializers.
MozReview-Commit-ID: F25p325gbiC
Instead use serde. This is the simplest possible conversion using the
serde Value type everywhere. The intent is to use the automatically
derived deserializers in the future.
MozReview-Commit-ID: F25p325gbiC
Increasing geckodriver's Keep-Alive timeout duration to 90
seconds, from the default five seconds, will reduce the number of
HTTP connections a persistent-enabled client will have to make,
potentially boosting performance.
In more recent hyper versions the default is 90 seconds, which
means we can get rid of this line when hyper is upgraded.
This will help mitigate https://github.com/mozilla/geckodriver/issues/1304
but not fundamentally resolve it, due to a standard library bug in
Python 2.7's urllib.
MozReview-Commit-ID: 98AFDQgWfpw
This makes geckodriver support WebDriver web elements, web frames,
and web windows.
Marionette sends back JSON Objects such as
{<element key>: <uuid>}
where the element key is one of the unique strings this patch adds
to geckodriver::marionette.
MozReview-Commit-ID: HegkGFqxkms
geckodriver currently only supports "accept" and "dismiss".
But to be compliant with the WebDriver specification all
allowed options have to be supported.
Given that Marionette uses the hard-coded dismiss and notify
behavior for unexpected prompts, inappropriately marked as
failed tests for accept/dismiss + notify for
execute_(async_)script will pass now.
MozReview-Commit-ID: 14kRTpvJYjZ