bug 1523104: remote: hook new remote protocol up to build system; r?#build

We have a new remote protocol in Firefox that is based on the Chrome
DevTools Protocol (CDP).  This is a low-level debugging interface with
which you can inspect the state and control execution of documents
running in web content, instrument Firefox in interesting ways, simulate
user interaction for automation purposes, and debug JavaScript execution.

This patch hooks the server part of this implementation, known as the
remote agent, up to the build system.  The remote agent is not enabled
in the default build, so the following is needed in mozconfig to build it:

	ac_add_options --enable-cdp

A subsequent change to enable the remote agent in Nightly builds only
will follow in due course.  That would allow us to run TaskCluster
test jobs to verify the remote protocol's functional integrity.

Differential Revision: https://phabricator.services.mozilla.com/D22729
This commit is contained in:
Andreas Tolfsen 2019-03-08 16:43:29 +00:00
parent b483c4a572
commit 8adf183333
3 changed files with 29 additions and 1 deletions

View File

@ -183,7 +183,14 @@
@RESPATH@/components/Push.manifest
; Remote control protocol
; CDP remote agent
#ifdef ENABLE_REMOTE_AGENT
@RESPATH@/components/RemoteAgent.js
@RESPATH@/components/RemoteAgent.manifest
@RESPATH@/defaults/pref/remote.js
#endif
; Marionette remote control protocol
#ifdef ENABLE_MARIONETTE
@RESPATH@/chrome/marionette@JAREXT@
@RESPATH@/chrome/marionette.manifest

View File

@ -903,6 +903,22 @@ add_old_configure_assignment('FT2_LIBS',
add_old_configure_assignment('FT2_CFLAGS',
ft2_info.cflags)
# CDP remote agent
# ==============================================================
#
# The source code lives under ../remote.
option('--enable-cdp', help='Enable CDP-based remote agent')
@depends('--enable-cdp')
def remote(value):
if value:
return True
set_config('ENABLE_REMOTE_AGENT', remote)
# Marionette remote protocol
# ==============================================================
#
@ -938,6 +954,7 @@ def marionette(value):
set_config('ENABLE_MARIONETTE', marionette)
# geckodriver WebDriver implementation
# ==============================================================
#
@ -967,6 +984,7 @@ def geckodriver(enabled):
set_config('ENABLE_GECKODRIVER', geckodriver)
# WebRTC
# ========================================================
@depends(target)

View File

@ -161,6 +161,9 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
'/toolkit/system/gnome',
]
if CONFIG['ENABLE_REMOTE_AGENT']:
DIRS += ['/remote']
if CONFIG['ENABLE_MARIONETTE']:
DIRS += [
'/testing/firefox-ui',