Instead of the default pytest error message when the assertion
fails, which is rather pointless because we know we did not match
the 200 HTTP status code, display the string representation of
wdclient.error.WebDriverException.
This string representation includes the remote end's stacktrace,
which is infinitely more useful in this context.
MozReview-Commit-ID: 6XUgEEc9Qoj
--HG--
extra : rebase_source : 68fbcf5e70bfcc064302b139b0c5edff2a0ecb72
This adds a new error.from_response(wdclient.Response) function that lets
a WebDriverException be constructed from a wdclient.Response object.
If the Response is not an error, i.e. has a 200 HTTP status code,
an UnknownErrorException is raised.
MozReview-Commit-ID: JW89Ily2voC
--HG--
extra : rebase_source : 5b126f3d62fc19a1ef0df7374167a7ee6828ab29
We talk about "error codes", not "status codes", for WebDriver errors.
This is a non-functional change.
MozReview-Commit-ID: Bl8zT8lZvzK
--HG--
extra : rebase_source : 7271e6a00170f58e4f1f0086c3d46b67664c7e4a
When showing wdclient.Response's object representation, prettify
the error if there is one. Otherwise include the full body as before.
MozReview-Commit-ID: 64QpsB89Oiw
--HG--
extra : rebase_source : d29a1b644156c6b0557d7d408a9b9398bc11d754
When server responses a field value with null, we have to ignore it, or we fail to SetRequestMethod for the http channel.
MozReview-Commit-ID: EW9NHMy22Fc
Cargo 0.23.0-beta, included with Rust 1.22.0-beta.2, wants to
move the top-level package description out of the [root] section
of Cargo.lock and into a parallel [[package]] section.
Accept this update by temporarily running the build without
passing --frozen and committing the result.
This is accepted by the cargo versions included in the current
and previous stable rust releases, so it will work with all
supported toolchains.
MozReview-Commit-ID: 1hMykhTknHi
--HG--
extra : rebase_source : 153d2016cd5e637584ea1d755198fbd1a5e7067e
find_paths_and_tags() can instantiate a BuildReader to read moz.build
metadata. We switch `mach test` to call this to avoid some redundant
code.
To facilitate `mach try`'s use case, we add test flavors to the
result of find_paths_and_metadata() and change the function name to
reflect its more generic purpose.
MozReview-Commit-ID: Lcz05W8g2dt
--HG--
extra : rebase_source : 17d6f23275f4eed1bd544a9b2cd991214625dabc
This will make the return value more easily extensible and will help
consumers know what the data structures represent.
MozReview-Commit-ID: DaeYsqfMW37
--HG--
extra : rebase_source : 440d16f0604b21f0ec885e1bca5066c32b18f641
The AutoTry code got moved around in 27b5181a3c77 and c94bf66df122
(bug 1382775). This broke `mach test` without arguments.
This commit imports the new location and uses the new API. As the
inline TODO states, there is still room for improvement. This will
be done in a separate commit.
MozReview-Commit-ID: AKHfdNnfOhl
--HG--
extra : rebase_source : dedd0171bafc1897c71f0710addb1f692c9f4844
The temporarily created sockets have to be removed immediately
by the operating system. Otherwise those enter the TIME_WAIT state,
and will be removed about 90s later. This can cause a pile of orphaned
sockets.
MozReview-Commit-ID: BGy9ZOjhjT0
--HG--
extra : rebase_source : f2e96d3e8d5d022b18c5f73daa15f3f8f06c74c5
Simply checking '_acceptConnections' when clients are trying to
connect to Marionette, and revoking the connection request inside
of 'onSocketAccepted' is plainly wrong, given that a connection is
already present.
Instead put the socket server into close state, which means it
does no longer listen for new connection attempts until new
connections are accepted again.
MozReview-Commit-ID: JIpOgOjnpDY
--HG--
extra : rebase_source : 6caa49fa81aec4a5fcf4bdbd3a4290b837a14281
When getting a session cookie we expect 'expiry' to be either null, or
to be missing.
MozReview-Commit-ID: Qvq0c0GiSO
--HG--
extra : rebase_source : c4531f8121ad6ecb95227aeea35a9cb44ad048ba
When a stacktrace is provided from Marionette, use the
WebDriverError::new_with_stack constructor to have it propagated
as the WebDriver error's stacktrace rather than use the Rust backtrace.
This patch also removes MarionetteSession::error_from_string in
favour of the new From<String> trait added to ErrorStatus.
It also implements an Into<WebDriverError> trait for MarionetteError
to ease the conversion.
MozReview-Commit-ID: 1z2IGUW5FS2
--HG--
extra : rebase_source : e6a54e275937893972102756b389d38f010e8e7f
For errors originating from Marionette we talk about "error codes",
not about "error statuses". This patch fixes the JSON serialisation
method Marionette::to_json which incorrectly serialised the error
code as "status"; it should be "error".
This also removes the MarionetteError::new constructor as we have
no need to allow explicit construction of MarionetteError's.
MozReview-Commit-ID: 7gjz0ebkMIU
--HG--
extra : rebase_source : 6ac6847840a12d1f2eef2e3364496fa3c2288347
This allows us to construct an ErrorStatus variant from a String.
This is useful if the remote end implementation uses the string
codes for transport.
The new From<String> trait for ErrorStatus is a reverse lookup of
ErrorStatus::error_code.
It currently handles two cases of Selenium errors, which are "element
not visible" and "invalid element coordinates". Both these have
been deprecated in the WebDriver standard and we need to figure
out a deprecation strategy for them.
MozReview-Commit-ID: 48MAVNQoiKy
--HG--
extra : rebase_source : 80c0932e3d42cfe19faa673d558790c83762dba1
The test case uses double intervals to make sure there is enough time to wait for the scroll event before continuing the testing. However, it doesn't work while the first timeout is delayed and the second one isn't. Tweaked the test case to start the second timer when the first one timeout.
MozReview-Commit-ID: gvhtIpzauE
This adds a --verify flag that is compatible with other Mozilla test
harnesses i.e. it runs each test 10 times without restarting and then
runs it 5 times with restarts, and then repeats with chaos mode
enabled.
This uses the code from, and can replace, the |wpt run --stability|
flag from upstream although that has different default behaviour
(running 10 times with restarts). More work is needed to avoid
duplicating all the code, however.
MozReview-Commit-ID: 7oUEwJk7uhZ
--HG--
extra : rebase_source : dd7a5dcf12f04adbd610323cca35af9b6d9b47ed
This adds a --rerun=N flag which runs each selected test N times in a row.
MozReview-Commit-ID: 4dGuPDkjWeZ
--HG--
extra : rebase_source : 0acd1393665af9a95023a547f869a57b48249931