Commit Graph
1255 Commits
Author SHA1 Message Date
Vedant Chakravadhanula 688d697ad8 Bug 1350897 - Tested quit shutdown/restart cause in Marionette Python client. r=whimboo
The Marionette server now returns a JSON containing the cause of shutdown which isn't included in previous Firefoxen. We needed to test this JSON in the quit and restart methods in the python client.

MozReview-Commit-ID: 8uL9tbNszcm
2017-10-03 10:48:30 +05:30
Ian MacLeod 9500ec1d4f Bug 1368034 - Update default values for urlbar searches in Marionette r=whimboo
Search suggestions create unneccessary network requests and the suggestions
opt-in notification interferes with tests that don't expect it to be there.
So, this patch updates the default settings in Marionette to disable both.

MozReview-Commit-ID: 8X8SYPq19tj
2017-09-25 02:10:47 -07:00
James Graham b31f4b84a3 Bug 1393366 - Increase the marionette connect timeout in wptrunner, r=maja_zf
This switches to using a timeout of 120s * timeout_multplier, which is
twice the current value. The Marionette startup_timout value is
removed because it turns out that's only used when marionette starts
the Firefox instance and therefore is ignored in this case.

MozReview-Commit-ID: 4VA8yB6M1d5
2017-09-21 17:56:43 +01:00
Henrik Skupin 0b02cda21a Bug 1399628 - Disable Shield extension in Marionette and geckodriver. r=ato
Shield experiments interfer with core features of Firefox which can
cause tests run via Marionette or geckodriver to fail. Resetting the
API URL will make sure that no experiments can be downloaded.

MozReview-Commit-ID: HnE49jfnen7
2017-09-14 21:03:40 +02:00
Sebastian Hengst aad205439d Backed out changeset 3baecf7b25f2 (bug 1399628) for build bustage. r=backout 2017-09-15 14:36:12 +02:00
Henrik Skupin 1cb63c5836 Bug 1399628 - Disable Shield extension in Marionette and geckodriver. r=ato
Shield experiments interfer with core features of Firefox which can
cause tests run via Marionette or geckodriver to fail. Resetting the
API URL will make sure that no experiments can be downloaded.

MozReview-Commit-ID: HnE49jfnen7
2017-09-14 21:03:40 +02:00
Henrik Skupin 15b251074e Bug 1397675 - Immediately kill the process if no connection can be made after startup. r=maja_zf
When the binary gets launched we do not immediately kill the process if the
connection to Marionette server cannot be established within the given amount
of seconds. Instead "_handle_socket_failure" is getting called because
the utility method `raise_for_port` inappropriately uses the `@do_process_check`
decorator.

By removing the decorator the initial connection attempt can be handled
differently. As such the process if handled by Marionette will be immediately
killed. Currently we are waiting for the process to quit itself within 120s,
which will actually never happen due to no active session.

Further `start_session` defaults to a timeout of 60s which itself is problematic
for test harnesses using Marionette but controlling the binary themselves. In
those cases timeouts can happen often for slow starting browser processes like
debug builds. Instead this timeout should default to the `startup_timeout` value.

MozReview-Commit-ID: BZvX5KT45mK
2017-09-07 15:40:19 +02:00
Henrik Skupin abc5d34529 Bug 1397734 - Centralize defaults for socket and startup timeouts r=maja_zf
Currently defaults for startup_timeout and socket_timeout are defined
at two different places (Marionette driver and harness). As of now it's
even the case that startup_timeout has different values. While Marionette
driver uses 120s, the harness only uses 60s.

As result all jobs which are based on the Marionette harness fail if
Firefox starts-up slowly like for debug builds.

MozReview-Commit-ID: Dl4sBG1H7NA
2017-09-07 15:36:50 +02:00
Sebastian Hengst af9598da03 Backed out changeset bc05e6c94a17 (bug 1397734) for mass mochitest failures (passed str to timedelta). r=backout on a CLOSED TREE 2017-09-08 09:30:48 +02:00
Henrik Skupin 8d16a96ace Bug 1397734 - Centralize defaults for socket and startup timeouts r=maja_zf
Currently defaults for startup_timeout and socket_timeout are defined
at two different places (Marionette driver and harness). As of now it's
even the case that startup_timeout has different values. While Marionette
driver uses 120s, the harness only uses 60s.

As result all jobs which are based on the Marionette harness fail if
Firefox starts-up slowly like for debug builds.

MozReview-Commit-ID: Dl4sBG1H7NA
2017-09-07 15:36:50 +02:00
Sebastian Hengst 98e4b418ea Backed out changeset 1e12a866239c (bug 1394381) for busting web-platform-tests. r=backout on a CLOSED TREE 2017-09-06 18:51:32 +02:00
Henrik Skupin 36ca367ff7 Bug 1394381 - Add logging output for Marionette connection attempts. r=maja_zf
If Marionette client cannot connect to the server, the attempts
have to be logged to stderr. This allows us to inspect the reason
why a connection from the client could not be made, and that it
still tries to connect (see bug 1362293).

MozReview-Commit-ID: ElE1M73ums8
2017-08-28 17:46:06 +02:00
Andrew Halberstadt 1d6a04b606 Bug 1395126 - Support cascading configuration for flake8, r=bc
This allows .flake8 files to override one another, and fixes a pretty bad known
bug with our flake8 implementation. For example, say we have a .flake8 file at:
/foo/.flake8

Before this patch, if we ran |mach lint foo/bar|, the configuration defined in
that .flake8 file wouldn't get picked up. It would only work if running the
specific directory that contains it, e.g |mach lint foo|.

This change additionally allows multiple .flake8 files to be used. So if
there's one defined at both:
/.flake8
/foo/.flake8

Then running |mach lint foo/bar| will first apply the root .flake8, then the
one under /foo (overriding earlier configuration).

This bug still doesn't make flake8 configuration perfect though. Any directory
containing a .flake8 file still needs to be explicitly listed in the "include"
section of /tools/lint/flake8.yml. Otherwise in the example above, if running
|mach lint /|, it wouldn't be able to find /foo/.flake8. This is a hard problem
and is likely best solved by fixing flake8's upstream configuration handling.

Unfortunately this means we still can't switch from a whitelist to a blacklist.

MozReview-Commit-ID: 3DZAi1QHYYo
2017-08-29 17:32:31 -04:00
Henrik Skupin d148fe6b38 Bug 1394377 - Increase default shutdown timeout to 120s. r=maja_zf
The background thread hang monitor will crash Firefox after 60s if
a shutdown is too slow. Debug builds are slower and as such Marionette
would force kill Firefox right before the hang monitor can kick in.

MozReview-Commit-ID: GGQFPEZ37dg
2017-08-28 17:35:39 +02:00
Francois Marier 5384b32d74 Bug 1388938 - Disable channel annotation and flashblock in tests harnesses.r=hchang
Since these tests harnesses are already disabling Safe Browsing and tracking
protection, they should also disable the other two features that cause
lists to be downloaded from the Mozilla shavar server.

MozReview-Commit-ID: 2158qRU4XZx
2017-08-23 15:47:37 -07:00
Francois Marier e1e98ed348 Bug 1385484 - Ensure that login reputation checks are disabled in tests. r=hchang
The login reputation checks depend on a server lookup and therefore would
render non-deterministic the performance and correctness of tests.

MozReview-Commit-ID: Bil0rSZsGPT
2017-08-22 17:56:20 -07:00
Wes Kocher ee18e318e9 Backed out 4 changesets (bug 1385484) for build failures a=backout
Backed out changeset 401c2744f16b (bug 1385484)
Backed out changeset 2ff443a0c744 (bug 1385484)
Backed out changeset 1a1c476a9aaa (bug 1385484)
Backed out changeset 87ec064a3681 (bug 1385484)

MozReview-Commit-ID: D9WGXiXaNoZ
2017-08-22 17:22:41 -07:00
Francois Marier 3c3460e995 Bug 1385484 - Ensure that login reputation checks are disabled in tests. r=hchang
The login reputation checks depend on a server lookup and therefore would
render non-deterministic the performance and correctness of tests.

MozReview-Commit-ID: Bil0rSZsGPT
2017-08-08 16:25:12 -07:00
Wes Kocher e2a5cbd398 Bug 1388424 - Fix flake8 issue a=me
MozReview-Commit-ID: 4OcGtGQfgyD
2017-08-11 13:04:38 -07:00
Andreas Tolfsen 9a67a84392 Bug 1388424 - Read capabilities off top-level object. r=whimboo
geckodriver sends capabilities as a JSON Object in the body of the
command, like this:

	[0,1,"newSession",{"acceptInsecureCerts":true}]

With https://bugzil.la/1387380 we wanted the Marionette Python client
to match this behaviour, however the patch overlooked the fact that
the server reads cmd.parameters.capabilities, meaning it looks for a
"capabilities" field on this object instead of treating the object as
the dictionary of capabilities.

As a follow-up to that bug, this patch removes the ability to override
the session ID by specifying a "sessionId" field.  This functionality
was only used for in-app restart tests.  When Firefox restarts, the
Marionette session is arguably not the same, and sessions should not
live on between restarts.

This patch will fix capabilities passed from geckodriver and align the
Marionette Python client.

For backwards compatibility reasons, it needs to be possible to use the
Python client with older Firefoxen that reads cmd.parameters.capabilities
instead of cmd.parameters.  This is why we duplicate the capabilities
object, like geckodriver does.

MozReview-Commit-ID: DCpaxl9hOLe
2017-08-11 11:06:15 +02:00
Andreas Tolfsen 1f8871497b Bug 1387380 - Stop capabilities negotiation in Marionette. r=whimboo
The geckodriver HTTPD proxy implements WebDriver conforming capabilities
negotation and it is unnecessary to do this in the Marionette WebDriver
service.  The capabilities matching that Marionette implements is also
not as good as the implementation found in geckodriver.

The WebDriver:NewSession command will still accept a JSON Object of
"configuration" capabilities that carry the pre-matched capabilities from
geckodriver.  These will be used as configuration options for the session.
Type- and bounds checks will still be performed on this input.

MozReview-Commit-ID: CROjgGuTXOG
2017-08-04 20:04:12 +01:00
Masatoshi Kimura 0af76969af Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC
2017-08-04 17:49:22 +09:00
Yangyi Peng 2f14f8853b Bug 1378121 - Add WebDriver:MinimizeWindow command to Marionette; r=ato
Implements the backend for the WebDriver standard's Minimize Window
command.

Signed-off-by: Andreas Tolfsen <[email protected]>
MozReview-Commit-ID: F5Z38LxhOJm
2017-07-21 17:00:41 +08:00
Andreas Tolfsen 569fb2acfc Bug 1381347 - Use deprecated quitApplication command in Marionette client; r=whimboo
Firefox update tests will break if we do not use the
`quitApplication' command, since the `quit' command is not available
in Firefox 53.

MozReview-Commit-ID: KJoCPBh9NKh
2017-07-17 20:19:30 +01:00
Henrik Skupin 5186addc16 Bug 1366199 - Release marionette-harness 4.1 and marionette-driver 2.3.0. r=maja_zf
MozReview-Commit-ID: GOrSXY8aHFJ
2017-06-28 10:18:13 -07:00
Henrik Skupin b347ad18a4 Bug 1223277 - TcpTransport.close() should't care about errno 107. r=ato
Beside Errno 57 there is also Errno 107 (Transport endpoint is not
connected) which can happen in case of an unexpected crash/shutdown
of Firefox. Then calling shutdown() on the socket to stop the
communication will fail.

This is most likely a race and can happen after receiving a reply
from the server, and before sending another command.

MozReview-Commit-ID: 3S5Ko4XVUAJ
2017-06-22 21:10:44 +02:00
Henrik Skupin 8e8cc628ce Bug 1375259 - Fix FennecInstance.close() for removal of restart keyword. r=ato
On bug 1373635 the restart keyword has been removed from
GeckoInstance.close(), but it was missed for FennecInstance,
which calls this method.

MozReview-Commit-ID: 5cEFJ6JXIVl
2017-06-23 14:52:41 +02:00
Ryan VanderMeulen de43b5add7 Backed out 6 changesets (bug 1223277) for causing Marionette test regressions.
Backed out changeset 85c86dc86122 (bug 1223277)
Backed out changeset aacd8d27b192 (bug 1223277)
Backed out changeset e6921a7229a3 (bug 1223277)
Backed out changeset b9f95fc81d23 (bug 1223277)
Backed out changeset 547744157e2a (bug 1223277)
Backed out changeset afbaa1138de3 (bug 1223277)
2017-06-23 12:15:23 -04:00
Henrik Skupin 458d724ad5 Bug 1223277 - TcpTransport.close() should't care about errno 107. r=ato
Beside Errno 57 there is also Errno 107 (Transport endpoint is not
connected) which can happen in case of an unexpected crash/shutdown
of Firefox. Then calling shutdown() on the socket to stop the
communication will fail.

This is most likely a race and can happen after receiving a reply
from the server, and before sending another command.

MozReview-Commit-ID: 3S5Ko4XVUAJ
2017-06-22 21:10:44 +02:00
Andreas Tolfsen d9fe471214 Bug 1375425 - Remove deprecated commands; r=automatedtester
The "timeouts" command could have been removed in Firefox 55, and
"quitApplication" can be removed with Firefox 56.

MozReview-Commit-ID: Fe7x8Yy0vSb
2017-06-22 10:42:55 +01:00
Andreas Tolfsen 74aa095905 Bug 1370863 - Remove Marionette.log API from client; r=automatedtester
MozReview-Commit-ID: FjBQ2p1DyLn
2017-06-09 14:28:15 +01:00
Henrik Skupin b0e09e64aa Bug 1373635 - Application profile has only be reset if explicitly requested. r=ato
For both quit() and restart() methods the profile should not be reset,
unless it has been requested. The current behavior breaks various tests
which make use of quit() and session_start() and which assume that
previously set preferences are still set, eg. sessionrestore tests.

MozReview-Commit-ID: 4BxSSJPrTYF
2017-06-16 15:31:45 +02:00
Ignaz Forster f84afb40eb Bug 1352023: Fix broken references / typos in Marionette docs; r=whimboo
MozReview-Commit-ID: 6Wo8ewMacjF
2017-06-08 23:40:55 +02:00
Wes Kocher 7794f25bea Backed out 5 changesets (bug 1370863) for marionette test failures a=backout CLOSED TREE
Backed out changeset e4605e515ffd (bug 1370863)
Backed out changeset 986d20fecd11 (bug 1370863)
Backed out changeset b0a081dfd577 (bug 1370863)
Backed out changeset bb80abe6a298 (bug 1370863)
Backed out changeset 90b14cb85f51 (bug 1370863)

MozReview-Commit-ID: chPvs0RWbK
2017-06-12 17:18:38 -07:00
Andreas Tolfsen 78eab96617 Bug 1370863 - Remove Marionette.log API from client; r=automatedtester
MozReview-Commit-ID: FjBQ2p1DyLn
2017-06-09 14:28:15 +01:00
Andreas Tolfsen 115433c0d2 Bug 1370857 - Remove Marionette.import_script API; r=automatedtester
Removes the Marionette.import_script API as it is not used by any
consumers of the client, including the Firefox UI tests.

MozReview-Commit-ID: 3xceYXZZVR0
2017-06-07 13:13:50 +01:00
Andreas Tolfsen de75f55536 Bug 1370857 - Remove Marionette.clear_imported_scripts API; r=automatedtester
The import script functionality was removed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1368648, but the
Marionette.clear_imported_script API was not removed from the client.

We are currently making calls after every test to the clearImportedScripts
command in the server, but we are apparently ignoring the ‘unknown
command’ error that is being returned.

MozReview-Commit-ID: KVjh2IfhuUY
2017-06-07 13:12:46 +01:00
Henrik Skupin 29ad94b376 Bug 1366784 - Force quit the application if requested quit or restart doesn't happen. r=maja_zf
In case a quit or restart is requested, but eg. the in_app
callback doesn't really trigger a shutdown of the application,
Marionette has to force close it after the default shutdown
timeout.

This is necessary because "acceptConnections" is set to false
and no further connection could be made to the still running
application.

MozReview-Commit-ID: GwSeYyjI6M9
2017-06-08 15:59:07 +02:00
David Burns ec27d36fcd Bug 1368674 - Remove B2G Permissionis handling from Marionette. r=ato
The Permissions API was used extensively during B2G to make sure the
state of the browser and permissions for APIs were in the relevant
state. This code is no longer used and can be removed.

MozReview-Commit-ID: HgcQe3GEd09
2017-06-06 13:55:23 +01:00
David Burns 4d24054118 Bug 1368674 - Remove setTestName functionality from Marionette r=whimboo
setTestName was used for logging which test was being run for the
JS Tests used in B2G.

MozReview-Commit-ID: FNF4Sm7vAYM
2017-05-30 16:28:36 +01:00
Ryan VanderMeulen eaf7bcb505 Backed out 3 changesets (bug 1368674) for Android test failures.
Backed out changeset ff3c813fcdea (bug 1368674)
Backed out changeset 0d9bb636b9a9 (bug 1368674)
Backed out changeset 1d0202706572 (bug 1368674)
2017-06-01 19:21:31 -04:00
David Burns 19dd1429d4 Bug 1368674 - Remove setTestName functionality from Marionette r=whimboo
setTestName was used for logging which test was being run for the
JS Tests used in B2G.

MozReview-Commit-ID: FNF4Sm7vAYM
2017-05-30 16:28:36 +01:00
Ryan VanderMeulen 3332c6a99a Backed out 3 changesets (bug 1368674) for flake8 failures.
Backed out changeset 9aa183c8533e (bug 1368674)
Backed out changeset 837ccbc38bfc (bug 1368674)
Backed out changeset 7f4f851da483 (bug 1368674)
2017-06-01 16:54:10 -04:00
David Burns 5b6ae2beb9 Bug 1368674 - Remove setTestName functionality from Marionette r=whimboo
setTestName was used for logging which test was being run for the
JS Tests used in B2G.

MozReview-Commit-ID: FNF4Sm7vAYM
2017-05-30 16:28:36 +01:00
Ryan VanderMeulen 711977f23c Merge inbound to m-c. a=merge 2017-05-19 11:46:56 -04:00
Francois Marier 2d17014412 Bug 1364959 - Clean up Safe Browsing preferences in tests. r=dimi
Remove the forbiddenURI pref which was removed in bug 1274893 as well
as browser.safebrowsing.enabled which got renamed in bug 1025965.

Set dummy URLs for all of the network endpoints.

MozReview-Commit-ID: Efk2fv6cC3g
2017-05-18 16:18:59 -07:00
Geoff Brown 5d3632889b Bug 1364228 - Increase marionette startup timeout for Linux mochitests; r=ato
Our linux32-debug build is very slow to startup when running mochitests on aws.
Sometimes we see similar behavior on other linux platforms. Intermittently,
in this environment, startup takes longer than the 120 seconds that marionette
waits, resulting in test failures in bug 1261598. Increasing the marionette
startup timeout to 180 seconds appears to effectively avoid these failures.
2017-05-17 10:30:32 -06:00
David Burns fc32911f8a Bug 1189749: Implement full screen support in Marionette r=ato
This implements the Full Screen method described in the WebDriver specification
(http://w3c.github.io/webdriver/webdriver-spec.html#fullscreen-window) as well as
tests for it.

MozReview-Commit-ID: GKec7GNE6rm
2017-05-08 16:41:35 +01:00
Michal Novotny 83896921e5 Bug 1361435 - Remove references to unused pref network.http.bypass-cachelock-threshold, r=mcmanus
Removes references to now unused pref that was added in bug 868441 and removed in bugs 913807 and 1054572. It also removes some leftovers from http channel which have not been removed in those 2 bugs.
2017-05-04 17:37:42 +02:00
Andreas Tolfsen 1e1190e7dd Bug 1355888 - Mark marionette.enabled pref in client as a deprecated; r=whimboo
To preserve backwards compatibility for in-app restarts using
Services.startup.quit(eRestart), we want to continue using the
marionette.enabled preference in the Python client until the patch
introducing the MARIONETTE environment variable (preceding this) makes
it into an official release.

This is due to the fact that the Marionette Python client is being
used for upgrade tests, and it is needs to stay compatible with all
release trains.

MozReview-Commit-ID: KstsJRu4lIP
2017-04-13 15:08:49 +01:00