Closed Bug 1484220 Opened 6 years ago Closed 6 years ago

Enable marionette on all Fennec builds

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(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 https://bugzilla.mozilla.org/show_bug.cgi?id=1426822#c50. 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
https://bugzilla.mozilla.org/show_bug.cgi?id=marionette-security
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
https://searchfox.org/mozilla-central/source/testing/marionette/jar.mn, 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.

IHTH
Thanks :ato!


I verified this doesn't break try/trunk:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=a48b49b7107bda358d0a8cd40c5d1c6f997d223c

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 gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e979fcf44dd
Enable marionette in all fennec builds; r=snorp
https://hg.mozilla.org/mozilla-central/rev/9e979fcf44dd
Status: NEW → RESOLVED
Closed: 6 years 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.

Attachment

General

Created:
Updated:
Size: