Commit Graph
132 Commits
Author SHA1 Message Date
Andreas Tolfsen a436b767f1 Bug 1391952 - Disable camel case lint for input and output. r=automatedtester
MozReview-Commit-ID: 5KargkSvSPn
2017-08-19 14:21:43 +01:00
Henrik Skupin baa2b4fc88 Bug 1254136 - Fix double registration for sessionstore-windows-restored. r=automatedtester
A missing break statement caused a double execution of the code in
"profile-after-change", which leads to two instantiations of the
Marionette server colliding due to the same port.

MozReview-Commit-ID: Dp6fncj463j
2017-08-10 18:04:47 +02:00
Sebastian Hengst 5146f4ca13 Backed out changeset 69f808119fa3 (bug 1254136) for failing marionette-headless' test_cli_arguments.py TestCommandLineArguments.test_start_in_safe_mode on OS X and in marionette on Linux opt. r=backout 2017-08-11 09:06:41 +02:00
Henrik Skupin 67cdacca7a Bug 1254136 - Fix double registration for sessionstore-windows-restored. r=automatedtester
MozReview-Commit-ID: Dp6fncj463j
2017-08-10 18:04:47 +02:00
dagasatvik 91d42b2553 Bug 1385820 - Enable the ESLint no-new-wrappers rule across mozilla-central; r=markh,standard8
MozReview-Commit-ID: FvJO3ibeiwg
2017-08-07 23:57:51 +05:30
Andreas Tolfsen ec31b545aa Bug 1385547 - Lint testing/marionette. r=automatedtester
Automatic fixes from './mach lint --fix testing/marionette'.

MozReview-Commit-ID: 4UOLrLLxMbH
2017-07-31 16:01:12 +01:00
Marco Castelluccio f491340c45 Bug 1357517 - Fix max-len eslint rule breakage in marionette.js. r=me 2017-07-30 21:12:36 +02:00
Marco Castelluccio 18a0b9ea36 Bug 1357517 - Remove or delay Preferences.jsm usage from Marionette. r=ato 2017-07-30 20:05:22 +02:00
Florian Quèze ad4e49e417 Bug 1380011 - Make startupRecorder.js' 'before handling user event' phase more reliable, r=mconley. 2017-07-12 23:09:42 +02:00
Henrik Skupin 4aaf4cd74d Bug 1378209 - Add DEBUG log line for received observer notifications. r=automatedtester
For debugging purposes it would be useful to see which observer
notifications have been received and handled by the Marionette
component.

MozReview-Commit-ID: 1EucCEjOXhu
2017-07-05 10:35:28 +02:00
Henrik Skupin 6ccde2d189 Bug 1378209 - Add INFO log lines for how Marionette got started. r=automatedtester
It is helpful to let the user know how Marionette get started. So
INFO log lines have to be added for the command line argument and
the environment variable.

This is especially helpful to get in case of missing observer
notifications, under which the server socket is not getting
created, and the client just hangs.

MozReview-Commit-ID: 4TEF33CDJKP
2017-07-05 10:33:23 +02:00
Henrik Skupin 888ff71d9e Bug 1374762 - Allow Marionette to handle the safe mode dialog. r=ato
In safe mode the command line hander arguments are getting parsed
after the safe mode dialog has been closed. As such Marionette is
not getting enabled before, and cannot close the dialog.

To workaround the problem the "command-line-startup" observer
notification can be used, which allows to parse the given
arguments before the dialog.

MozReview-Commit-ID: LWzUKCnM0YK
2017-06-29 22:12:03 -07:00
Wes Kocher f9208b5310 Backed out changeset 05a807bd0010 (bug 1374762) for eslint failures a=backout 2017-06-30 14:49:27 -07:00
Henrik Skupin d74c5baefb Bug 1374762 - Allow Marionette to handle the safe mode dialog. r=ato
In safe mode the command line hander arguments are getting parsed
after the safe mode dialog has been closed. As such Marionette is
not getting enabled before, and cannot close the dialog.

To workaround the problem the "command-line-startup" observer
notification can be used, which allows to parse the given
arguments before the dialog.

MozReview-Commit-ID: LWzUKCnM0YK
2017-06-29 22:12:03 -07:00
Andreas Tolfsen 521870d93c Bug 1376128 - Lint testing/marionette; r=automatedtester
MozReview-Commit-ID: DY4yCSBEZrN
2017-06-29 16:40:24 -07:00
Andreas Farre e1969f3dd4 Bug 1368072 - Use idleDispatchToMainThread instead. r=ato
Adapt to the move of nsIThread.idleDispatch to
nsIThreadManager.idleDispatchToMainThread.
2017-06-22 11:14:11 +02:00
Phil Ringnalda 483d45dcb9 Backed out 3 changesets (bug 1368072) for colliding with a new use of the thing it was renaming
Backed out changeset 1d7e008d7d70 (bug 1368072)
Backed out changeset c4a1ddf9be0d (bug 1368072)
Backed out changeset ba1cdae5a8d6 (bug 1368072)
2017-06-21 23:28:37 -07:00
Andreas Farre 2d424ea6ab Bug 1368072 - Use idleDispatchToMainThread instead. r=ato
Adapt to the move of nsIThread.idleDispatch to
nsIThreadManager.idleDispatchToMainThread.
2017-06-21 12:36:41 +02:00
Phil Ringnalda bc4a75b212 Backed out 3 changesets (bug 1368072) for timeouts in test_TelemetrySession.js and test_fullscreen-api.html and unhandled "TypeError: Services.tm.mainThread.idleDispatch is not a function" promise rejections
Backed out changeset 357635c84e49 (bug 1368072)
Backed out changeset 1797afe16a2a (bug 1368072)
Backed out changeset 4782401394a9 (bug 1368072)

MozReview-Commit-ID: 6kdcSkERjTD
2017-06-20 21:41:14 -07:00
Andreas Farre f984a5dfb7 Bug 1368072 - Use idleDispatchToMainThread instead. r=ato
Adapt to the move of nsIThread.idleDispatch to
nsIThreadManager.idleDispatchToMainThread.
2017-06-14 08:59:00 +02:00
Dão Gottwald d568e6a097 Bug 1367076 - Set datareporting.policy.firstRunURL by default to replace data choices infobar with privacy policy in a background tab on first run. r=Gijs
MozReview-Commit-ID: 9r5el0I2HrA
2017-05-31 13:48:06 +02:00
Florian Quèze 914e5f3a29 Bug 1369700 - Delay initialization of marionette.js until delayed startup and startup tests are finished, r=ato.
Before this patch, marionette.js starts its initialization right after receiving the "sessionstore-windows-restored" notification.
This is unfortunate for the browser_startup.js browser chrome mochitest added in bug 1358798, because it causes lots of marionette file to appear to be loaded before the browser is ready to handle user events.
2017-06-02 22:08:21 +02:00
Andreas Tolfsen 6b216208f7 Bug 1355890 - Add Marionette XPCOM interface r=maja_zf
This adds a minimal XPCOM interface to access Marionette as a service.
All it does for now is to expose whether the Marionette server is
running, which will report true when the TCP listener socket is open and
false otherwise.

This will be used in browser/base/content/browser.js to determine
whether or not to add a visual UX cue on newly started <xul:browser>s.

MozReview-Commit-ID: 4Q9Oy2B9GQ1
2017-05-12 18:13:25 +01:00
Andreas Tolfsen 5e5349ccd3 Bug 1355890 - Namespace Marionette component r=automatedtester
The Marionette XPCOM component is currently called
@mozilla.org/marionette;1, but this change namespaces it under
@mozilla.org/remote/marionette;1 to indicate that it is a remote
protocol because not everyone will understand what that the own-name
"Marionette" means.

MozReview-Commit-ID: HwqAghsWA5W
2017-05-12 18:14:38 +01:00
Andreas Tolfsen e6e64e2cc8 Bug 1355888 - Clarify that -marionette flag works cross platform; r=whimboo
Windows systems only accept singled-dashed -marionette, whereas Unix
platforms accept both that and double-dashed --marionette.  This makes
the documentation true for all supported platforms.

MozReview-Commit-ID: IG7ir2HVoHo
2017-04-13 15:22:40 +01:00
Andreas Tolfsen 2ac00aab19 Bug 1355888 - Remove unused DEFAULT_PORT constant; r=whimboo
MozReview-Commit-ID: 3lkxXFM7Jz0
2017-04-13 15:09:30 +01:00
Andreas Tolfsen db652a4911 Bug 1355888 - Remove marionette.enabled pref; r=maja_zf,whimboo
There are no current use cases for starting and stopping the Marionette
server at runtime through a preference.  Since it is possible for
arbitrary addons to modify any preference, we are removing it to reduce
the potential attack surface for Marionette.

This effectively leaves only three ways of starting Marionette:
By passing the -marionette flag to the Firefox binary at startup,
setting the MOZ_MARIONETTE environment variable, and by calling
server.TCPListener#start(), which is an internal chrome API.

MozReview-Commit-ID: 9zKsV8ufySU
2017-04-13 15:08:14 +01: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
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
Florian Queze d3c36892fa Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst 42670ceca0 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze 9b4f73599f Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Andreas Tolfsen c8ab8f3b72 Bug 1350887 - Propagate errors thrown when starting server.TCPListener; r=whimboo
Errors thrown are printed to console and there is no point in having a
custom catch to print it.

This also makes it possible to start Marionette programmatically without
worrying about disappearing errors.

MozReview-Commit-ID: GGhyCyYqJg
2017-03-28 16:48:20 +01:00
Andreas Tolfsen 0382320440 Bug 1350887 - Bind sacrificial goat to ephemeral port; r=whimboo
Port 666 is in the protected port range and can not normally be bound
to unless the process is running with sudo permissions.

We can instead bind to port 0, which will give us a system-defined port
in the epemeral range.

MozReview-Commit-ID: Ld6BDMhtbck
2017-03-28 16:46:54 +01:00
Andreas Tolfsen 73f0e502e6 Bug 1350887 - Fall back to deprecated pref if it exists; r=whimboo
This is a follow-up to address a fallout caused by bug 1344748 whereby
deprecated preferences relevant to Marionette are no longer being
picked up.  This is preventing trace logs from being emitted in CI.

The old logic related to falling back to a deprecated preference is
faulty in that it the preferred, new preference always exists through
the power of testing/marionette/prefs.js.  This patch introduces a new
helper method getPref that first looks at whether the preferred pref
is set, and only falls back to the deprecated if it isn't set and the
deprecation preference exists.

MozReview-Commit-ID: 8DeawLAELyK
2017-03-27 14:28:32 +01:00
Sebastian Hengst 44fe9baf85 Backed out changeset 0a6f238454c3 (bug 1350887) 2017-04-04 15:54:35 +02:00
Sebastian Hengst edab6bea13 Backed out changeset 142552196615 (bug 1350887) 2017-04-04 15:54:30 +02:00
Sebastian Hengst 611ceafb3c Backed out changeset 2f0db92fbe1b (bug 1350887) 2017-04-04 15:54:26 +02:00
Andreas Tolfsen 9ec9ed3264 Bug 1350887 - Propagate errors thrown when starting server.TCPListener; r=whimboo
Errors thrown are printed to console and there is no point in having a
custom catch to print it.

This also makes it possible to start Marionette programmatically without
worrying about disappearing errors.

MozReview-Commit-ID: GGhyCyYqJg
2017-03-28 16:48:20 +01:00
Andreas Tolfsen 6043242db7 Bug 1350887 - Bind sacrificial goat to ephemeral port; r=whimboo
Port 666 is in the protected port range and can not normally be bound
to unless the process is running with sudo permissions.

We can instead bind to port 0, which will give us a system-defined port
in the epemeral range.

MozReview-Commit-ID: Ld6BDMhtbck
2017-03-28 16:46:54 +01:00
Andreas Tolfsen a836f4e37d Bug 1350887 - Fall back to deprecated pref if it exists; r=whimboo
This is a follow-up to address a fallout caused by bug 1344748 whereby
deprecated preferences relevant to Marionette are no longer being
picked up.  This is preventing trace logs from being emitted in CI.

The old logic related to falling back to a deprecated preference is
faulty in that it the preferred, new preference always exists through
the power of testing/marionette/prefs.js.  This patch introduces a new
helper method getPref that first looks at whether the preferred pref
is set, and only falls back to the deprecated if it isn't set and the
deprecation preference exists.

MozReview-Commit-ID: 8DeawLAELyK
2017-03-27 14:28:32 +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 ad177003b1 Bug 1350887 - Propagate errors thrown when starting server.TCPListener; r=whimboo
Errors thrown are printed to console and there is no point in having a
custom catch to print it.

This also makes it possible to start Marionette programmatically without
worrying about disappearing errors.

MozReview-Commit-ID: GGhyCyYqJg
2017-03-28 16:48:20 +01:00
Andreas Tolfsen ac8bc09040 Bug 1350887 - Bind sacrificial goat to ephemeral port; r=whimboo
Port 666 is in the protected port range and can not normally be bound
to unless the process is running with sudo permissions.

We can instead bind to port 0, which will give us a system-defined port
in the epemeral range.

MozReview-Commit-ID: Ld6BDMhtbck
2017-03-28 16:46:54 +01:00
Andreas Tolfsen ce9022b49b Bug 1350887 - Fall back to deprecated pref if it exists; r=whimboo
This is a follow-up to address a fallout caused by bug 1344748 whereby
deprecated preferences relevant to Marionette are no longer being
picked up.  This is preventing trace logs from being emitted in CI.

The old logic related to falling back to a deprecated preference is
faulty in that it the preferred, new preference always exists through
the power of testing/marionette/prefs.js.  This patch introduces a new
helper method getPref that first looks at whether the preferred pref
is set, and only falls back to the deprecated if it isn't set and the
deprecation preference exists.

MozReview-Commit-ID: 8DeawLAELyK
2017-03-27 14:28:32 +01:00
Sebastian Hengst e86fc3fe93 Backed out changeset f41bca9ebd0b (bug 1350887) 2017-04-03 21:40:08 +02:00
Sebastian Hengst 5522d1459e Backed out changeset f54dbd3d2e62 (bug 1350887) 2017-04-03 21:40:04 +02:00
Sebastian Hengst 84af398d05 Backed out changeset 4bdb7f140370 (bug 1350887) 2017-04-03 21:40:00 +02:00
Andreas Tolfsen 9bddd988fe Bug 1350887 - Propagate errors thrown when starting server.TCPListener; r=whimboo
Errors thrown are printed to console and there is no point in having a
custom catch to print it.

This also makes it possible to start Marionette programmatically without
worrying about disappearing errors.

MozReview-Commit-ID: GGhyCyYqJg
2017-03-28 16:48:20 +01:00
Andreas Tolfsen f866cecf24 Bug 1350887 - Bind sacrificial goat to ephemeral port; r=whimboo
Port 666 is in the protected port range and can not normally be bound
to unless the process is running with sudo permissions.

We can instead bind to port 0, which will give us a system-defined port
in the epemeral range.

MozReview-Commit-ID: Ld6BDMhtbck
2017-03-28 16:46:54 +01:00