mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Backed out 4 changesets (bug 1533831) for xpcshell failures on remote/test/unit/test_Error.js. CLOSED TREE
Backed out changeset a3014b38cc5f (bug 1533831) Backed out changeset 57a319eeed2d (bug 1533831) Backed out changeset afcfdae88bf7 (bug 1533831) Backed out changeset c03450df8660 (bug 1533831)
This commit is contained in:
parent
ea6fe15c68
commit
6e8934bb87
@ -12,7 +12,12 @@ layer.
|
||||
|
||||
See https://firefox-source-docs.mozilla.org/remote/ for documentation.
|
||||
|
||||
The remote agent is disabled by default, but can be enabled by
|
||||
setting a preference before running it:
|
||||
The remote agent is not by default included in Firefox builds. To
|
||||
build it, put this in your mozconfig:
|
||||
|
||||
% ./mach run --setpref "remote.enabled=true" --remote-debugger
|
||||
ac_add_options --enable-cdp
|
||||
|
||||
This exposes a --remote-debugger flag you can use to start the
|
||||
remote agent:
|
||||
|
||||
% ./mach run --setpref "browser.fission.simulate=true" -- --remote-debugger
|
||||
|
@ -6,21 +6,14 @@
|
||||
|
||||
// Stopgap module until we can land bug 1536862 and remove this temporary file
|
||||
|
||||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const {RemoteAgent} = ChromeUtils.import("chrome://remote/content/RemoteAgent.jsm");
|
||||
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "RemoteAgent",
|
||||
"chrome://remote/content/RemoteAgent.jsm");
|
||||
|
||||
const RemoteAgentFactory = {
|
||||
createInstance(outer, iid) {
|
||||
if (outer) {
|
||||
throw Cr.NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
// we can't use Preferences.jsm before first paint
|
||||
if (!Services.prefs.getBoolPref("remote.enabled")) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return RemoteAgent.QueryInterface(iid);
|
||||
},
|
||||
|
@ -1,49 +1,25 @@
|
||||
Building
|
||||
========
|
||||
|
||||
The remote agent is included in the default Firefox build, but
|
||||
disabled by default. To expose the remote agent you can set the
|
||||
`remote.enabled` preference to true before running it:
|
||||
The remote agent is by default not included in Firefox builds.
|
||||
To build it, put this in your [mozconfig]:
|
||||
|
||||
% ./mach run --setpref="remote.enabled=true" --remote-debugger
|
||||
ac_add_options --enable-cdp
|
||||
|
||||
The source code is found under `$(topsrcdir)/remote`.
|
||||
This exposes a `--remote-debugger` flag you can use to start the
|
||||
remote agent:
|
||||
|
||||
Full build mode
|
||||
---------------
|
||||
% ./mach run --setpref "browser.fission.simulate=true" -- --remote-debugger
|
||||
|
||||
The remote agent supports only Firefox, and is included when you
|
||||
build in the usual way:
|
||||
|
||||
% ./mach build
|
||||
|
||||
When you make changes to XPCOM component files you need to rebuild
|
||||
When you make changes to the XPCOM component you need to rebuild
|
||||
in order for the changes to take effect. The most efficient way to
|
||||
do this, provided you haven’t touched any compiled code (C++ or Rust):
|
||||
|
||||
% ./mach build faster
|
||||
|
||||
Component files include the likes of command-line-handler.js,
|
||||
RemoteAgent.manifest, moz.build files, prefs/remote.js, and jar.mn.
|
||||
All the JS modules (files ending with `.jsm`) are symlinked into
|
||||
the build and can be changed without rebuilding.
|
||||
|
||||
You may also opt out of building the remote agent entirely by setting
|
||||
the `--disable-cdp` build flag in your [mozconfig]:
|
||||
|
||||
ac_add_options --disable-cdp
|
||||
|
||||
|
||||
Artifact mode
|
||||
-------------
|
||||
|
||||
You may also use [artifact builds] when working on the remote agent.
|
||||
This fast build mode downloads pre-built components from the Mozilla
|
||||
build servers, rendering local compilation unnecessary. To use
|
||||
them, place this in your [mozconfig]:
|
||||
|
||||
ac_add_options --enable-artifact-builds
|
||||
|
||||
Component files include the likes of RemoteAgent.js, RemoteAgent.manifest,
|
||||
moz.build files, prefs/remote.js, and jar.mn. All the JS modules
|
||||
(files ending with `.jsm`) are symlinked into the build and can be
|
||||
changed without rebuilding.
|
||||
|
||||
[mozconfig]: ../build/buildsystem/mozconfigs.html
|
||||
[artifact builds]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds
|
||||
|
@ -9,6 +9,6 @@ To increase the internal logging verbosity you can use the
|
||||
|
||||
If you use mach to start the Firefox:
|
||||
|
||||
./mach run --setpref "remote.enabled=true" --setpref "remote.log.level=Debug" --remote-debugger
|
||||
./mach run --setpref "browser.fission.simulate=true" --setpref "remote.log.level=Debug" -- --remote-debugger
|
||||
|
||||
[preference]: ./Prefs.md
|
||||
|
@ -10,11 +10,9 @@ Configurable preferences
|
||||
### `remote.enabled`
|
||||
|
||||
Indicates whether the remote agent is enabled. When the remote
|
||||
agent is enabled, it exposes a [`--remote-debugger` flag] for Firefox.
|
||||
agent is enabled, it exposes a `--remote-debugger` flag for Firefox.
|
||||
When set to false, the remote agent will not be loaded on startup.
|
||||
|
||||
[`--remote-debugger` flag]: Usage.html
|
||||
|
||||
### `remote.force-local`
|
||||
|
||||
Limits the remote agent to be allowed to listen on loopback devices,
|
||||
|
@ -6,7 +6,7 @@ The remote agent has unit- and functional tests located under
|
||||
|
||||
You may run all the tests locally using `mach test` like this:
|
||||
|
||||
% ./mach test --setpref "remote.enabled=true" remote/test
|
||||
% ./mach test remote/test
|
||||
|
||||
The tests are currently not run on try.
|
||||
|
||||
@ -17,7 +17,7 @@ Unit tests
|
||||
Because tests are run in parallel and [xpcshell] itself is quite
|
||||
chatty, it can sometimes be useful to run the tests in sequence:
|
||||
|
||||
% ./mach xcpshell-test --setpref "remote.enabled=true" --sequential remote/test/unit/test_Assert.js
|
||||
% ./mach xcpshell --sequential remote/test/unit/test_Assert.js
|
||||
|
||||
The unit tests will appear as part of the `X` jobs on Treeherder.
|
||||
|
||||
@ -30,6 +30,6 @@ Functional tests
|
||||
We also have a set of functional [browser chrome] tests located
|
||||
under _remote/test/browser_:
|
||||
|
||||
% ./mach mochitest --setpref "remote.enabled=true" -f browser remote/test/browser/browser_cdp.js
|
||||
% ./mach mochitest -f browser remote/test/browser/browser_cdp.js
|
||||
|
||||
[browser chrome]: https://developer.mozilla.org/en-US/docs/Mozilla/Browser_chrome_tests
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Indicates whether the remote agent is enabled.
|
||||
// If it is false, the remote agent will not be loaded.
|
||||
pref("remote.enabled", false);
|
||||
pref("remote.enabled", true);
|
||||
|
||||
// Limits remote agent to listen on loopback devices,
|
||||
// e.g. 127.0.0.1, localhost, and ::1.
|
||||
|
@ -1,6 +1,6 @@
|
||||
[DEFAULT]
|
||||
tags = remote
|
||||
prefs = remote.enabled=true
|
||||
subsuite = remote
|
||||
support-files =
|
||||
chrome-remote-interface.js
|
||||
head.js
|
||||
|
@ -919,14 +919,9 @@ add_old_configure_assignment('FT2_CFLAGS',
|
||||
# See https://firefox-source-docs.mozilla.org/remote/ for more.
|
||||
# The source code lives under ../remote.
|
||||
|
||||
@depends(target, milestone)
|
||||
def remote_default(target, milestone):
|
||||
return target.os != 'Android' and milestone.is_nightly
|
||||
option('--enable-cdp', help='{Enable|Disable} remote agent')
|
||||
|
||||
option('--disable-cdp', default=remote_default,
|
||||
help='{Enable|Disable} remote agent')
|
||||
|
||||
@depends('--disable-cdp')
|
||||
@depends('--enable-cdp')
|
||||
def remote(value):
|
||||
if value:
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user