Closed Bug 1484220 Opened 2 years ago Closed 1 year ago

Enable marionette on all Fennec builds


(Firefox Build System :: General, enhancement)

Not set


(firefox63 fixed)

Tracking Status
firefox63 --- fixed


(Reporter: gbrown, Assigned: gbrown)




(1 file)

+++ This bug was initially created as a clone of Bug #1460315 +++

Originally, marionette was enabled only on build-android-api-16/debug. In bug 1460315, marionette was enabled on all "non-release" fennec builds. 

In this bug, we propose enabling marionette for all fennec builds. This will allow us to use marionette for setting up extensions in test harnesses, as proposed in We can also run Android marionette tests on release builds. We can also contemplate running Android wpt tests on release builds in the future.

Everyone I've talked to seems a little fuzzy about why we limited this earlier to non-release builds. Concerns about security? (What exactly?) Concerns about bloat? (How much?) In discussion in this week's Mobile Testing meeting, we thought "let's give it a try", but if you have concerns, don't be shy!
Thanks for considering this!

There were initial concerns about security, but Marionette has since
been through a security review.  Every security related change we’ve
made since has also been run past the security team.  See
for a track record.

Marionette’s security model is simple: it is disabled by default
and can only be enabled by flipping the marionette.enabled pref.
Setting this to true will spin up a TCP listener on the port
designated by marionette.port (2828 by default).  Connections to
this port are limited to loopback only through Ci.nsIServerSocket’s
LoopbackOnly bitmask.  This means you must have access to the shell
of the current user to make use of Marionette.

It is not a web-exposed feature, although navigator.webdriver will
tell a web document if it is enabled.  This is to inform web
applications that might wish to run alternate code paths in automation,
and navigator.webdriver provides a standard way of doing this.

Marionette bloats Fennec in two different ways: it will include the
additional jar defined in, but
it is all interpreted JS code, so I wouldn’t expect the package
size of Fennec to increase in any noteworthy way.  The second point
is that instrumenting a browser necessarily comes with some performance
impact.  We haven’t done any coordinated measurements of this, but
we don’t believe executing more code at runtime as the browser is
being automated is free.

Thanks :ato!

I verified this doesn't break try/trunk:

I am just about to go on pto, so won't try to land this until I return, but if anyone else wants to proceed here sooner, I think that would be okay.
Attachment #9001985 - Flags: review?(snorp)
Attachment #9001985 - Flags: review?(snorp) → review+
Pushed by
Enable marionette in all fennec builds; r=snorp
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
I expect to see a regression in apk size on beta and release only (when this patch gets there). Building mozilla-central without marionette currently saves about 200 Kb.
You need to log in before you can comment on or make changes to this bug.