bug 1523104: remote: hook new remote protocol up to build system; r?#build
authorAndreas Tolfsen <ato@sny.no>
Fri, 08 Mar 2019 16:43:29 +0000
changeset 521151 820ed215c28687eca5a1d6437e50fbbc55a7250f
parent 521150 ef858f29737050e1af5049d6efd6a8c019572505
child 521152 67424fa758d40134fdca363ec9a7a992aa92403f
child 521232 817f8ac607139b53d92f04b6327577109de5fa19
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1523104
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
browser/installer/package-manifest.in
toolkit/moz.configure
toolkit/toolkit.mozbuild
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -178,17 +178,24 @@
 #endif
 @RESPATH@/components/SyncComponents.manifest
 @RESPATH@/components/servicesComponents.manifest
 @RESPATH@/components/servicesSettings.manifest
 @RESPATH@/components/cryptoComponents.manifest
 
 @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
 @RESPATH@/components/marionette.manifest
 @RESPATH@/components/marionette.js
 @RESPATH@/defaults/pref/marionette.js
 #endif
 
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -898,16 +898,32 @@ def ft2_info(freetype2_combined_info, tr
         return freetype2_combined_info
 
 set_config('FT2_LIBS', ft2_info.libs)
 add_old_configure_assignment('FT2_LIBS',
                              ft2_info.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
 # ==============================================================
 #
 # Marionette is the Gecko remote protocol used for various remote control,
 # automation, and testing purposes throughout Gecko, Firefox, and Fennec.
 # Marionette lives in ../testing/marionette.
 #
 # Marionette is not really a toolkit feature, as much as a Gecko engine
@@ -933,16 +949,17 @@ option('--enable-marionette',
 
 @depends('--enable-marionette')
 def marionette(value):
     if value:
         return True
 
 set_config('ENABLE_MARIONETTE', marionette)
 
+
 # geckodriver WebDriver implementation
 # ==============================================================
 #
 # Turn off geckodriver for build configs we don't handle yet,
 # but allow --enable-geckodriver to override when compile environment is available.
 # --disable-tests implies disabling geckodriver.
 
 @depends('--enable-tests', target, cross_compiling, hazard_analysis, asan)
@@ -962,16 +979,17 @@ option('--enable-geckodriver', default=g
 
 @depends('--enable-geckodriver', when='--enable-compile-environment')
 def geckodriver(enabled):
     if enabled:
         return True
 
 set_config('ENABLE_GECKODRIVER', geckodriver)
 
+
 # WebRTC
 # ========================================================
 @depends(target)
 def webrtc_default(target):
     # Turn off webrtc for OS's we don't handle yet, but allow
     # --enable-webrtc to override.
     os_match = False
     for os_fragment in ('linux', 'mingw', 'android', 'linuxandroid',
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -156,16 +156,19 @@ DIRS += [
     '/other-licenses/snappy',
 ]
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     DIRS += [
         '/toolkit/system/gnome',
     ]
 
+if CONFIG['ENABLE_REMOTE_AGENT']:
+    DIRS += ['/remote']
+
 if CONFIG['ENABLE_MARIONETTE']:
     DIRS += [
         '/testing/firefox-ui',
         '/testing/marionette',
     ]
 
 if CONFIG['ENABLE_GECKODRIVER'] and not CONFIG['MOZ_TSAN']:
     DIRS += ['/testing/geckodriver']