Commit Graph
76 Commits
Author SHA1 Message Date
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
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
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
Henrik Skupin 1930a71b32 Bug 1390486 - Add "dom.file.createInChild" preference to recommended prefs. r=ato
To allow geckodriver to create file objects in child processes, this
preference has to be set to true. As such it needs to be recommended
in Marionette and set as default preference for geckodriver.

MozReview-Commit-ID: 8bdbi5jH6Vc
2017-08-15 17:47:15 +02:00
Andreas Tolfsen ae2e17f9c1 Bug 1388082 - Drop Task.jsm from Marionette. r=automatedtester
MozReview-Commit-ID: HbEHjOv1W3g
2017-08-07 19:02:20 +01:00
Andreas Tolfsen f52986781a Bug 1384517 - Fix testing/marionette API docs; r=automatedtester
Various fixes to make the generated API documentation from
testing/marionette somewhat easier to read.

MozReview-Commit-ID: F9duuQoOYBt
2017-07-26 13:11:53 +01:00
Andreas Tolfsen 521870d93c Bug 1376128 - Lint testing/marionette; r=automatedtester
MozReview-Commit-ID: DY4yCSBEZrN
2017-06-29 16:40:24 -07:00
Andreas Tolfsen d81d7b9dad Bug 1376128 - Use selective imports from error module; r=automatedtester
Instead of importing everything from the testing/marionette/error.js
module into the global scope, we need to be selective about what symbols
we want.

MozReview-Commit-ID: HZDAS0bs0GD
2017-06-28 11:01:49 -07: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
Andreas Tolfsen b28f296aca Bug 1355890 - Add remote-active system notification r=automatedtester,Gijs
Adds a new system notification, "remote-active", which fires
when the Marionette remote protocol becomes active.

MozReview-Commit-ID: 3Parr82Ch6I
2017-04-27 23:18:26 +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 5ae6082762 Bug 1355888 - Add env var MOZ_MARIONETTE to start server; r=maja_zf,whimboo
This patch introduces a new environment variable, MOZ_MARIONETTE, which
if set will start the Marionette remote control server.  This is meant
to be analogous to passing the -marionette flag to the Firefox binary.

When the server is started, we set the environment variable to
preserve Marionette's enabled state across internal restarts.
When Services.startup.quit(eRestart) is called, Firefox is restarted
without the original command line flags it was started with, which means
we lose track of whether Marionette was enabled.  By setting
MOZ_MARIONETTE in-process, we preserve the knowledge of this state.

This approach is in line with how state is preserved across in-app
restarts in toolkit/xre/nsAppRunner.cpp:4761 (XRE_PROFILE_*), and for
how MOZ_APP_RESTART and XUL_APP_FILE works.

MozReview-Commit-ID: Dcb34m6FoZh
2017-04-15 01:50:29 +01:00
Mike Conley ffb4cca140 Bug 1352501 - Remove Reader Mode promotion panel. r=jaws,MattN
Note that the UITour library can still show a panel in the event that we want to
promote the feature that way.

MozReview-Commit-ID: FzKSzO987h7
2017-04-19 16:42:10 -04:00
Alexandre Poirot 05d5da266e Bug 1356237 - Ship a copy of transport module in marionette. r=ato
DevTools is about to move out of mozilla-central and be released as an add-on.
So that these protocol files are going to be missing from the tree.
To accommodate that, we are doing a copy of them next to marionette.

MozReview-Commit-ID: 9PyhuwyZyXI
2017-04-24 20:23:04 +02:00
Andreas Tolfsen 6e1cb18631 Bug 1358988 - Write Marionette port to preference when binding; r=whimboo
Write the allocated port to the marionette.port preference when binding
the TCP socket server to the requested port.

If the socket is bound to port 0, this instructs the system to atomically
allocate a free port in the ephemeral range.  Writing the resolved port
to a preference will make it possible to communicate this port number
to the client, removing any chance of a race condition occurring by the
client looking for a free port (binding and releasing) for the server.

MozReview-Commit-ID: JwyG2G4YQmX
2017-04-24 10:28:57 +01:00
Andreas Tolfsen 8f31ab43ae Bug 1356229 - Prevent non-loopback connections in Marionette; r=whimboo
This patch removes the Marionette server's ability to accept non-loopback
connections completely.  The configuration option for this, the
marionette.forcelocal preference, was removed in the previous patch in
this changeset.

MozReview-Commit-ID: 3XXYpTDGs8S
2017-04-19 15:10:28 +01:00
Andreas Tolfsen e6c387c28e Bug 1356229 - Remove marionette.forcelocal preference; r=whimboo
marionette.forcelocal was historically used to connect free-standing B2G
devices over real networks, such as wi-fi, to Marionette.  Since we do
not have this use case anymore and Android uses adb and port forwarding,
this removes the marionette.forcelocal preference to reduce the attack
surface for Marionette.

MozReview-Commit-ID: KgqUrilpwMM
2017-04-13 14:19:38 +01:00
Jim Porter e6d010d8bf Bug 1352069 - Introduce a pref that allows for disabling cosmetic animations r=jaws
This rolls browser.tabs.animate, browser.fullscreen.animate, and
alerts.disableSlidingEffect into a single pref; if any of these are disabled,
we'll disable the new pref too (toolkit.cosmeticAnimations.enabled). Most
future animations will also be subject to this pref.

MozReview-Commit-ID: 77pLMtERDna
2017-04-11 13:47:31 -05:00
Andreas Tolfsen 62cba7679b Bug 1350887 - Warn when non-loopback connections are allowed; r=whimboo
MozReview-Commit-ID: LG8f5q5QbD6
2017-03-28 17:06:06 +01:00
Sebastian Hengst 82c06a6294 Backed out changeset 12afeda05d47 (bug 1350887) 2017-04-04 15:54:22 +02:00
Andreas Tolfsen 7cd5ba71da Bug 1350887 - Warn when non-loopback connections are allowed; r=whimboo
MozReview-Commit-ID: LG8f5q5QbD6
2017-03-28 17:06:06 +01:00
Wes Kocher a96bb31fd3 Backed out 7 changesets (bug 1350887) for build bustage on a CLOSED TREE
Backed out changeset d2b395e6c5c0 (bug 1350887)
Backed out changeset 5a6d5c43135f (bug 1350887)
Backed out changeset ec57676ad0d1 (bug 1350887)
Backed out changeset 4a3d1a8767f7 (bug 1350887)
Backed out changeset 40cd9ca1553e (bug 1350887)
Backed out changeset d264991a436d (bug 1350887)
Backed out changeset b915d40a6ba6 (bug 1350887)
2017-04-03 13:30:35 -07:00
Andreas Tolfsen f296b4b362 Bug 1350887 - Warn when non-loopback connections are allowed; r=whimboo
MozReview-Commit-ID: LG8f5q5QbD6
2017-03-28 17:06:06 +01:00
Sebastian Hengst f468ac922d Backed out changeset a47faebbd684 (bug 1350887) 2017-04-03 21:39:55 +02:00
Andreas Tolfsen 5b477ec099 Bug 1350887 - Warn when non-loopback connections are allowed; r=whimboo
MozReview-Commit-ID: LG8f5q5QbD6
2017-03-28 17:06:06 +01:00
Andreas Tolfsen 3e9e37c96e Bug 1351422 - Prevent redirect on Firefox upgrade in automation; r=maja_zf
This preference should have been part of the recommended automation
preferences when the set was first installed.  This recitfies the omission
by not causing the browser to redirect the user to an upgrade website
when a milestone upgrade of Firefox is detected.

MozReview-Commit-ID: ACUeJ2vPhl9
2017-03-28 19:50:33 +01:00
Andreas Tolfsen dbc86c5e7c Bug 1337743 - Handle corrupt packets to Marionette; r=whimboo
When Marionette receives packets it does not know how to deal with,
handle this gracefully and attempt to respond to the client that we were
unable to process them.

If it receives a packet that is corrupt, e.g. one it is impossible to
determine the message ID of, report an error to the console without
failing spectacularly.

If it receives a packet that it is unable to unmarshal, attempt to craft
a response for it with containing the error signature.

MozReview-Commit-ID: BLi8yIkGQfF
2017-02-09 18:29:25 +00:00
Andreas Tolfsen a33790036f Bug 1344748 - Gate recommended prefs on a preference; r=maja_zf,whimboo
MozReview-Commit-ID: FnqBDAXpg6v
2017-03-07 21:02:05 +00:00
Andreas Tolfsen f8ce400d3c Bug 1344748 - Merge dispatcher into server.js; r=maja_zf
Merges testing/marionette/dispatcher.js into testing/marionette/server.js
and renames it server.TCPConnection.

The rationale behind this change is that the current dispatcher is not
a single entity to which incoming requests are dispatched.  The old
organisation might make sense if this was an HTTP server where all
connections are transitive and it didn't hold any connection details,
however the dispatcher is in effect a representation of a client socket
connection.

Since the module is not used elsewhere, it makes sense to pair it with
the existing server.TCPListener class.

MozReview-Commit-ID: 2HF35OiP6AY
2017-03-06 17:39:42 +00:00
Andreas Tolfsen 205193e867 Bug 1344748 - Make testing/marionette/server.js a class; r=maja_zf,whimboo
No functional changes apart from class'ifying the file and harmonising
the export symbol with the rest of the Marionette code base by renaming
the MarionetteServer class to server.TCPListener.

MozReview-Commit-ID: 8WJKoprGGvr
2017-03-06 17:09:07 +00:00
Andreas Tolfsen 18a5359aaf Bug 1344748 - Set recommended prefs when Marionette starts; r=automatedtester,maja_zf,whimboo
This makes the Marionette server itself set a long list of recommended
automation preferences when it starts up, and reset those it changed
when stopping.

Preferences used in automation are currently written to the Firefox
profile before Firefox starts, but after a closer examination of the
preferences, it is thought that many of them can be set at runtime.

There is a subset of preferences that are checked on startup and which
must be set in the profile.  These are clearly called out in the comments.
We still set them at runtime, since we foresee a future where it will
be possible to attach an existing Firefox session to geckodriver, and
many of the prefs can also be checked at runtime during the course of
that automation session.

For example, if we would not set the "app.update.auto" preference in
such a runtime, opening the About dialogue would cause a forced update
of Firefox.  This is not desirable when the browser is under Marionette
control.  When the Marionette server is stopped, the altered preferences
are reset and the browser session's state is returned to its pre-existing
condition.

This change does not mean it is dangerous or wrong for consumers to write
their own preferences to the profile.  Any preferences written to the
profile will take precedence over this set of recommended preferences.
If the recommended Marionette preference has a user-defined value (i.e. it
is written to the profile before starting up or has manually changed),
that user-set value is preferred.

The list of preferences in this file is the authorative reference of
recommended preferences for using Marionette in automation.  They have
been gathered from geckoinstance.py and geckodriver.

MozReview-Commit-ID: INHSQRg2XjF
2017-03-06 16:47:38 +00:00
Andreas Tolfsen f982028d56 Bug 1344748 - Remove B2G offline management from Marionette; r=maja_zf
MozReview-Commit-ID: 68iUhwT7xdv
2017-03-06 16:45:35 +00:00
Thomas Charles b57e64d886 Bug 1316975 - Correct function definition style in Marionette components; r=ato
No functional changes.

MozReview-Commit-ID: 25cWAnpRB9H
2016-12-04 12:42:52 +01:00
Henrik Skupin 8d324069c5 Bug 1309556 - Ensure to correctly shutdown the application for quit/restart when callbacks are used. r=ato
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
2016-10-17 13:19:19 +02:00
Andreas Tolfsen d359d42a59 Bug 1282800 - Remove device capability from Marionette; r=automatedtester
MozReview-Commit-ID: 4ZlojpuwpUN
2016-06-28 15:26:49 +01:00
Karl Tomlinson e47078e9da bug 1281293 increase marionette server listen backlog to 1 r=ato
to accept connections on Linux 4.4.
https://bugzilla.kernel.org/show_bug.cgi?id=119141

MozReview-Commit-ID: B5NMkHiGNg6
2016-06-22 09:37:40 +12:00
David Burns 66e24489d8 Bug 1274408: Remove emulator support from Marionette in Gecko r=ato
The emulator code was originally hacks to allow us to instrument the emulator
from JavaScript in the B2G world. Since we no longer support this it is being
removed.

MozReview-Commit-ID: 3XDk21SFfUc
2016-05-24 10:22:54 +01:00
Andreas Tolfsen 8f87c689ce Bug 1245153 - Remove testing/marionette/ChromeUtils.js; r=automatedtester
This does not appear to be in use.

MozReview-Commit-ID: B4M335Lb1UM
2016-02-03 19:18:30 +00:00
Andreas Tolfsen 207b902479 Bug 1245153 - Rename elements.js to element.js; r=automatedtester
MozReview-Commit-ID: KAGGXOHMvyM
2016-02-03 19:14:10 +00:00
Andreas Tolfsen dbbefaa079 Bug 1245153 - Employ new modules throughout Marionette; r=automatedtester
This change removes almost all the remaining uses of loadSubScript and
global scope pollution.  The only remaining use is for common.js, which
is resolved by a later bug for evaluating scripts.

MozReview-Commit-ID: 96h0yLElauq
2016-02-03 18:56:02 +00:00
Carsten "Tomcat" Book 8f534e440a Backed out 18 changesets (bug 1245153) for multiple test failures
Backed out changeset 18d54b8d4ae8 (bug 1245153)
Backed out changeset 98b6d0c053c0 (bug 1245153)
Backed out changeset c29a348930a4 (bug 1245153)
Backed out changeset f79252e92acc (bug 1245153)
Backed out changeset 9f3f1c358e47 (bug 1245153)
Backed out changeset 3b9e9a027fa7 (bug 1245153)
Backed out changeset 6da8099573f3 (bug 1245153)
Backed out changeset 63a56310a1b5 (bug 1245153)
Backed out changeset 5fe42d498a2a (bug 1245153)
Backed out changeset b3be2d2f3ac1 (bug 1245153)
Backed out changeset ad5bf32d8fef (bug 1245153)
Backed out changeset 68a6dda373d2 (bug 1245153)
Backed out changeset 6ebd9fde50c0 (bug 1245153)
Backed out changeset e41a5b41859a (bug 1245153)
Backed out changeset 048d70070751 (bug 1245153)
Backed out changeset eff85dc0eaa9 (bug 1245153)
Backed out changeset dc6460e0f336 (bug 1245153)
Backed out changeset 36526a2e8b00 (bug 1245153)
2016-02-11 17:05:41 +01:00
Andreas Tolfsen 12a09f3151 Bug 1245153 - Remove testing/marionette/ChromeUtils.js; r=automatedtester
This does not appear to be in use.

MozReview-Commit-ID: B4M335Lb1UM
2016-02-03 19:18:30 +00:00
Andreas Tolfsen ce98e4ef08 Bug 1245153 - Rename elements.js to element.js; r=automatedtester
MozReview-Commit-ID: KAGGXOHMvyM
2016-02-03 19:14:10 +00:00
Andreas Tolfsen f737199135 Bug 1245153 - Employ new modules throughout Marionette; r=automatedtester
This change removes almost all the remaining uses of loadSubScript and
global scope pollution.  The only remaining use is for common.js, which
is resolved by a later bug for evaluating scripts.

MozReview-Commit-ID: 96h0yLElauq
2016-02-03 18:56:02 +00:00
Carsten "Tomcat" Book aea1b0ea44 Backed out 16 changesets (bug 1245153) for mochitest test-bustage on a CLOSED TREE
Backed out changeset 30c8ec933737 (bug 1245153)
Backed out changeset 4c2b1902d7cd (bug 1245153)
Backed out changeset 1be5f60393a0 (bug 1245153)
Backed out changeset 22321e6b65e9 (bug 1245153)
Backed out changeset c1e0abbfa66e (bug 1245153)
Backed out changeset 80ae953819c8 (bug 1245153)
Backed out changeset 3edb67388ad6 (bug 1245153)
Backed out changeset 55f64197f6b5 (bug 1245153)
Backed out changeset 6bb93562a576 (bug 1245153)
Backed out changeset 5da7628c3767 (bug 1245153)
Backed out changeset bd41e4ab829d (bug 1245153)
Backed out changeset ee7ee24cc65e (bug 1245153)
Backed out changeset 4b2a5ee7199e (bug 1245153)
Backed out changeset d75ad1397656 (bug 1245153)
Backed out changeset 1f5e37f8e446 (bug 1245153)
Backed out changeset aec0a0166685 (bug 1245153)
2016-02-05 14:18:19 +01:00
Andreas Tolfsen b92534f5ce Bug 1245153 - Remove testing/marionette/ChromeUtils.js; r=automatedtester
This does not appear to be in use.
2016-02-03 19:18:30 +00:00