This is mostly using the import-globals-from rule to pull in globals when
the subscript loader is used. For a couple of files I've turned off no-undef
altogether, these are files that are loaded by the subscript loader and depend
on globals from the parent.
MozReview-Commit-ID: 2ZzgpCQTTuu
--HG--
extra : rebase_source : 6d2f20111ae27858811bd19db794dc9fb29183d0
Removing the always parameter which is kinda useless here. Originally it was added to call
check_for_crash() in case of a MarionetteException happening. But such an exception is never
thrown in case of crashes. It will always be an IOError. So lets get it removed and ensure
we call check_for_crashes() in all the cases, and can feed the crash status into the call to
handle_socket_failure().
MozReview-Commit-ID: JeK3X7voocD
--HG--
extra : rebase_source : 0b6ecf1e59c0e4e830b3bc3df57dda0af842a176
There are currently various issues in Marionette which cause extra and unnecessary logging output
in case of chrome and content crashes. Especially the latter ones are not easy to discover. This
patch makes the following improvements:
* Correctly mark process crashes as IOError test failure. Until now we have only used the "Process
has been closed" message, which does not correctly cover it, especially not if the process shutdown without
a crash.
* Allow changing the socket_timeout for the socket client. This was mainly necessary to allow unit tests
to run faster.
* Collect the number of crashes so it's known even later if the process has been crashed during the
current session. It also fixes the case when check_for_crash() gets called twice, and for the
second time False is returned which will trigger an invalid code path.
* Reduce code duplication when destroying a session.
* Adding a unit test to verify the correct behavior for chrome and content crashes.
MozReview-Commit-ID: KdUQuJqFRli
--HG--
extra : rebase_source : a2a0b0269ff84679acc6698c72ec8dc45b1dfe52
The page loading timeout is not included in the message sent to
Marionette:pollForReadyState from chrome after a remoteness change occurs.
The call is appended to the pending commands and re-issued/flushed when
Marionette:listenersAttached fires after a remoteness change.
MozReview-Commit-ID: 4UMD4x9ugMA
--HG--
extra : rebase_source : e9b0452c0d58fd10e6a3409b54d6561fdfdf4d47
Since the Marionette Python client is being used for upgrade tests
it needs to remain backwards compatible with earlier Gecko versions.
Bug 1302707 changed the Marionette:timeouts API, and this patch addresses
the fallout caused by that.
When sending the new command format and it returns with an error, we try
again with the old format if the error message contained "Not a Number".
This is not ideal, but a natural consequence of poor error typing in
the past.
We can remove this workaround when Firefox 51 becomes the stable train.
MozReview-Commit-ID: JxQAuKnojPB
--HG--
extra : rebase_source : 0eeb3e51fcf73d32c29f53739e9e4e48374a5a96
By using a callback the usual shutdown logic from quitApplication() is not executed and as such
will create a race-condition for the client when trying to re-connect to the server. To fix that
we have to stop the server from accepting new connections until the application has been completely
shutdown.
Also delete_session() has to be called for the default in_app shutdown logic and when using a callback.
MozReview-Commit-ID: GmIM2GGwQ2P
--HG--
extra : rebase_source : 56f8ba75f9297fa4de0a143fe5c5017529d0b528
In case when the instance is not running, the method would check for the port again
and again until the timeout is reached. This extra time can be spent if the process
status is checked.
MozReview-Commit-ID: C2WAWNC5CWE
--HG--
extra : rebase_source : c4077e63c19a8fdb91e4120d94051b5b51f9d9a9
In case when the instance is not running, the method would check for the port again
and again until the timeout is reached. This extra time can be spent if the process
status is checked.
MozReview-Commit-ID: C2WAWNC5CWE
--HG--
extra : rebase_source : 2a8ab59fa60ee07b34048e95453d27aa8a2b0f3b
parseInt accepts any value and coerces it to a number. isNaN allows
floats, and the specification says we should only have integers.
MozReview-Commit-ID: HeZ1eA0duWe
--HG--
extra : rebase_source : b582c0afe1889e8058d32d39314694b3556c4352
The WebDriver specification mandates that the page loading timeout must
be five minutes, and the script timeout 30 seconds.
MozReview-Commit-ID: E82jGXCb2ch
--HG--
extra : rebase_source : e1015cbf1cb01b7b48948592be9a022b87670118
The `get` function in testing/marionette/listener.js used an evaluated
if-condition test to determine if a page timeout was given. This would
fail if passed 0 because 0 evaluates to false in JavaScript.
This patch fixes the incorrect type check by looking at whether the
variable has been defined or not.
MozReview-Commit-ID: 39vDZRjKAFb
--HG--
extra : rebase_source : f8100e05f9b1165e20b5aaab6e89b09fd110b3d2
The input type for the `ms` field when passing the old JSON schema that
puts Marionette into the backwards compatible behaviour, accepts string
types that are `parseInt`ed into an integer. This change adds a test
for this.
MozReview-Commit-ID: GJ3ibit7tyG
--HG--
extra : rebase_source : f8ddc6fa46f8917afd650eeabdaf2916c5a3bc04