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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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