Граф коммитов

155 Коммитов

Автор SHA1 Сообщение Дата
Gurzau Raul 71e35400ef Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-04-25 19:30:38 +03:00
Andreas Tolfsen 3c8ae0e869 bug 1546722: remote: print better errors in browser chrome tests; r=yulia
We can reconstruct the CDP error and print a better error message
using RemoteAgentError.  This is better than the current output,
which in a lot of cases will be "CDP Exception: [object Object]".

A possible future improvement to this involves extending the CDP
protocol to send the individual components of the error individually,
so that we don't have to parse the string.

Differential Revision: https://phabricator.services.mozilla.com/D28703

--HG--
extra : moz-landing-system : lando
2019-04-25 15:16:46 +00:00
Andreas Tolfsen 8ccafe6392 bug 1546714: remote: fix bug component mapping for remote/targets/; r=ochameau
There are two concepts of targets in CDP: the target web document,
and the Target domain.  The remote/targets/ subfolder is related
to the first, which should have bugs filed under Remote Protocol ::
Agent, covered by the preceding rule.

DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D28689

--HG--
extra : moz-landing-system : lando
2019-04-25 13:49:57 +00:00
Andreas Tolfsen d3121dd02c bug 1546714: remote: map Remote Protocol :: {DOM, Input} bug components; r=ochameau
Patch unfortunately has to add a few domain stubs so that mach does
not complain about not finding any files associated with these new
bug components.

Differential Revision: https://phabricator.services.mozilla.com/D28688

--HG--
extra : moz-landing-system : lando
2019-04-25 14:27:15 +00:00
Andreas Tolfsen 9d9634b875 bug 1546935: remote: reflect that remote agent is disabled in usage docs; r=me a=doc
DONTBUILD
2019-04-25 12:01:12 +01:00
Andreas Tolfsen 0ec47f620a bug 1546933: remote: clarify that tests are run on try; r=me a=doc
DONTBUILD
2019-04-25 11:52:53 +01:00
Andreas Tolfsen 86da122b28 bug 1546933: remote: drop unnecessary flags for ./mach test; r=me a=doc
The tests are instrumented to automatically set the remote.enabled
preference as part of their manifests. In the case of xpcshell,
it is also technically not need it as they do not trigger the
command-line-handler.js code path.

DONTBUILD
2019-04-25 11:52:52 +01:00
Bogdan Tara 7b9699da3b Backed out 2 changesets (bug 1546714) for test_mozbuild_reading.py bustages CLOSED TREE
Backed out changeset 02a67f69acd2 (bug 1546714)
Backed out changeset c29a7a2c36d6 (bug 1546714)
2019-04-25 14:15:22 +03:00
Andreas Tolfsen b5e28c3210 bug 1546714: remote: fix bug component mapping for remote/targets/; r=ochameau
There are two concepts of targets in CDP: the target web document,
and the Target domain.  The remote/targets/ subfolder is related
to the first, which should have bugs filed under Remote Protocol ::
Agent, covered by the preceding rule.

DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D28689

--HG--
extra : moz-landing-system : lando
2019-04-25 10:33:01 +00:00
Andreas Tolfsen e40c27877d bug 1546714: remote: map Remote Protocol :: {DOM, Input} bug components; r=ochameau
DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D28688

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:38 +00:00
Andreas Tolfsen 5107d02ac8 bug 1533831: remote: remove test_FatalError; r=ochameau
FatalError uses Services.startup.quit and this is apparently fine
to run in an xpcshell test with an optimised build, but not with
debug builds where it causes MOZ_CRASH() to be hit.

This removes test_FatalError so that we can run test_Error.js on try.

Differential Revision: https://phabricator.services.mozilla.com/D28705

--HG--
extra : moz-landing-system : lando
2019-04-24 17:28:14 +00:00
Andreas Tolfsen 942eecb096 bug 1533831: remote: run bc tests as part of regular batch; r=ochameau
The remote debugger mochitest browser-chrome tests do not have to
be run in a separate subsuite.  Removing the subsuite condition
will make them appear as part of the normal M-bc* jobs on try.

Differential Revision: https://phabricator.services.mozilla.com/D27932

--HG--
extra : moz-landing-system : lando
2019-04-24 17:18:14 +00:00
Andreas Tolfsen b3dc3fc611 bug 1533831: remote: include remote agent in default build; r=firefox-build-system-reviewers,chmanchester
The previous commit disabled the remote agent by flipping the
remote.enabled preference to false.  That prevented the remote
agent from initialising or being included in the --help message.

This patch implies --enable-cdp in the default Firefox build on Firefox
Nightly.  Firefox for Android is not supported.  This will cause
builds to include the remote agent component that lives under remote/.

Since the remote agent is disabled by default, users will first
have to set the remote.enabled preference to true in order to use it.

If you wish to explicitly opt out of including the remote agent
when building Firefox, you may do so by using the --disable-cdp
build flag in your mozconfig:

	ac_add_options --disable-cdp

Differential Revision: https://phabricator.services.mozilla.com/D27540

--HG--
extra : moz-landing-system : lando
2019-04-24 17:18:22 +00:00
Andreas Tolfsen a3273a8312 bug 1533831: remote: disable remote agent; r=ochameau
This disables the remote agent through flipping the remote.enabled
preference to false.  This will cause the help text to disappear from
--help and the RemoteAgent#init() (in remote/RemoteAgent.jsm) to fail.

We also change RemoteAgent.jsm to being loaded lazily so that it
isn't imported.

Differential Revision: https://phabricator.services.mozilla.com/D27539

--HG--
extra : moz-landing-system : lando
2019-04-24 17:18:37 +00:00
Andreas Tolfsen 6625f0d1e9 bug 1533831: remote: remove browser.fission.simulate pref; r=ochameau,yulia
The browser.fission.simulate preference has been split
into two preferences: fission.frontend.simulate-events and
fission.frontend.simulate-messages.

The remote agent briefly used the child actor system from the
Firefox frontend code when we prototyped the initial remote agent,
but it no longer relies on it.  This means we can drop the reference
to browser.fission.simulate altogether.

DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D27538

--HG--
extra : moz-landing-system : lando
2019-04-24 17:18:44 +00:00
Cosmin Sabou 6e8934bb87 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)
2019-04-24 19:55:51 +03:00
Andreas Tolfsen 28ce4058ed bug 1533831: remote: run bc tests as part of regular batch; r=ochameau
The remote debugger mochitest browser-chrome tests do not have to
be run in a separate subsuite.  Removing the subsuite condition
will make them appear as part of the normal M-bc* jobs on try.

Differential Revision: https://phabricator.services.mozilla.com/D27932

--HG--
extra : moz-landing-system : lando
2019-04-24 15:18:28 +00:00
Andreas Tolfsen 9eab4824cb bug 1533831: remote: include remote agent in default build; r=firefox-build-system-reviewers,chmanchester
The previous commit disabled the remote agent by flipping the
remote.enabled preference to false.  That prevented the remote
agent from initialising or being included in the --help message.

This patch implies --enable-cdp in the default Firefox build on Firefox
Nightly.  Firefox for Android is not supported.  This will cause
builds to include the remote agent component that lives under remote/.

Since the remote agent is disabled by default, users will first
have to set the remote.enabled preference to true in order to use it.

If you wish to explicitly opt out of including the remote agent
when building Firefox, you may do so by using the --disable-cdp
build flag in your mozconfig:

	ac_add_options --disable-cdp

Differential Revision: https://phabricator.services.mozilla.com/D27540

--HG--
extra : moz-landing-system : lando
2019-04-24 15:18:09 +00:00
Andreas Tolfsen e3303b3d92 bug 1533831: remote: disable remote agent; r=ochameau
This disables the remote agent through flipping the remote.enabled
preference to false.  This will cause the help text to disappear from
--help and the RemoteAgent#init() (in remote/RemoteAgent.jsm) to fail.

We also change RemoteAgent.jsm to being loaded lazily so that it
isn't imported.

Differential Revision: https://phabricator.services.mozilla.com/D27539

--HG--
extra : moz-landing-system : lando
2019-04-24 15:18:02 +00:00
Andreas Tolfsen 5d69ffdef8 bug 1533831: remote: remove browser.fission.simulate pref; r=ochameau,yulia
The browser.fission.simulate preference has been split
into two preferences: fission.frontend.simulate-events and
fission.frontend.simulate-messages.

The remote agent briefly used the child actor system from the
Firefox frontend code when we prototyped the initial remote agent,
but it no longer relies on it.  This means we can drop the reference
to browser.fission.simulate altogether.

DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D27538

--HG--
extra : moz-landing-system : lando
2019-04-24 15:17:50 +00:00
Andreas Tolfsen 888b647600 bug 1546385: remote: listen for target to connect sooner; r=ochameau
TabManager.addTab(), and consequently gBrowser.addTab(), causes
tabs to open before Target#createTarget() gets time to install an
listener for a new target.

Since targets are created on the TabOpen event, we must install the
listener before we open the tab.  This has the consequence that we
cannot reliably tell where the first target that connects comes from.
For this reason, this makes a functional change to return an error
if such an eventuality should arise.

This patch fixes the failing remote/test/browser/browser_target.js
browser-chrome test.

Differential Revision: https://phabricator.services.mozilla.com/D28492

--HG--
extra : moz-landing-system : lando
2019-04-24 07:45:19 +00:00
Gurzau Raul 9b30abf7c9 Backed out 4 changesets (bug 1533831) for failing at /browser/browser_target.js on a CLOSED TREE.
Backed out changeset 94fd0790781a (bug 1533831)
Backed out changeset d32384388e3d (bug 1533831)
Backed out changeset bd363475667f (bug 1533831)
Backed out changeset b818d6ca606d (bug 1533831)
2019-04-18 05:35:54 +03:00
Andreas Tolfsen 77f0eda9ee bug 1533831: remote: run bc tests as part of regular batch; r=ochameau
The remote debugger mochitest browser-chrome tests do not have to
be run in a separate subsuite.  Removing the subsuite condition
will make them appear as part of the normal M-bc* jobs on try.

Differential Revision: https://phabricator.services.mozilla.com/D27932

--HG--
extra : moz-landing-system : lando
2019-04-17 17:46:04 +00:00
Andreas Tolfsen b864268d1a bug 1533831: remote: include remote agent in default build; r=firefox-build-system-reviewers,chmanchester
The previous commit disabled the remote agent by flipping the
remote.enabled preference to false.  That prevented the remote
agent from initialising or being included in the --help message.

This patch implies --enable-cdp in the default Firefox build on Firefox
Nightly.  Firefox for Android is not supported.  This will cause
builds to include the remote agent component that lives under remote/.

Since the remote agent is disabled by default, users will first
have to set the remote.enabled preference to true in order to use it.

If you wish to explicitly opt out of including the remote agent
when building Firefox, you may do so by using the --disable-cdp
build flag in your mozconfig:

	ac_add_options --disable-cdp

Differential Revision: https://phabricator.services.mozilla.com/D27540

--HG--
extra : moz-landing-system : lando
2019-04-17 16:41:38 +00:00
Andreas Tolfsen 6d913ac017 bug 1533831: remote: disable remote agent; r=ochameau
This disables the remote agent through flipping the remote.enabled
preference to false.  This will cause the help text to disappear from
--help and the RemoteAgent#init() (in remote/RemoteAgent.jsm) to fail.

We also change RemoteAgent.jsm to being loaded lazily so that it
isn't imported.

Differential Revision: https://phabricator.services.mozilla.com/D27539

--HG--
extra : moz-landing-system : lando
2019-04-17 16:41:52 +00:00
Andreas Tolfsen fd5a1792d6 bug 1533831: remote: remove browser.fission.simulate pref; r=ochameau,yulia
The browser.fission.simulate preference has been split
into two preferences: fission.frontend.simulate-events and
fission.frontend.simulate-messages.

The remote agent briefly used the child actor system from the
Firefox frontend code when we prototyped the initial remote agent,
but it no longer relies on it.  This means we can drop the reference
to browser.fission.simulate altogether.

DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D27538

--HG--
extra : moz-landing-system : lando
2019-04-17 16:41:29 +00:00
Andreas Tolfsen f7c6bb254b bug 1543676: remote: avoid Preferences.jsm before first paint; r=yulia
It is illegal for any code to depend on
Preferences.jsm before first paint.  This enforced by
browser/base/content/test/performance/browser_startup.js, so we
must change remote/RemoteAgent.jsm to use an alternate mechanism
for getting at the preferences it needs.

Differential Revision: https://phabricator.services.mozilla.com/D27246

--HG--
extra : moz-landing-system : lando
2019-04-15 14:41:21 +00:00
Csoregi Natalia 9b4cbfd8ef Merge mozilla-central to autoland. CLOSED TREE 2019-04-15 18:27:25 +03:00
Csoregi Natalia 1e8b9b451b Backed out changeset bfaec0e9d5d8 (bug 1542198) as per request. a=backout 2019-04-15 18:14:54 +03:00
Andreas Tolfsen 6f0a882a05 bug 1543679: remote: remove unused server files; r=ochameau,yulia
These files became redundant after we started serving WebSocket
connections from the HTTPD.

This fixes the test
browser/base/content/test/static/browser_all_files_referenced.js,
which checks for unreferenced JSMs.

Differential Revision: https://phabricator.services.mozilla.com/D27247

--HG--
extra : moz-landing-system : lando
2019-04-15 14:06:25 +00:00
Andreas Tolfsen 9c97965f1c bug 1542198: remote: build tests only on --enable-tests; r=ochameau
As we don't actually build anything inside remote/test, this
shouldn't make any functional difference at all.

Differential Revision: https://phabricator.services.mozilla.com/D26305

--HG--
extra : moz-landing-system : lando
2019-04-09 14:45:58 +00:00
Andreas Tolfsen 874448b445 bug 1541834: remote: drop max-len lint rule; r=ochameau
The eslint max-len rule is not enforced in the top-level eslint
config, rendering this rule (and file) unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D26088

--HG--
extra : moz-landing-system : lando
2019-04-05 11:46:08 +00:00
Andreas Tolfsen ab0b38e5c0 bug 1537775: remote: move method sanity check into Domains.splitMethod; r=ochameau
This moves the assertions related to the well-formedness of the method
from the TabSession consumer to Domains.splitMethod.  Following the
introduction of TabSession, this was missing from the superclass Session.

This also fixes the "Foo.bar.baz" test case in
remote/test/unit/test_Domains.js by removing the split() function
and instead relying on String#split() inside Domains.splitMethod.

Thanks-to: Alexandre Poirot <ochameau@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D25947

--HG--
extra : moz-landing-system : lando
2019-04-04 09:39:28 +00:00
Andreas Tolfsen da5a13b347 bug 1537775: remote: clarify method/domain/command terminology; r=ochameau
The remote agent currently uses "method" interchangably for the
full method string as extracted from JSON input as well as for the
function part following the first dot after the method has been split.

To avoid namespace clashes, this patch makes a distinction between
method, being the input JSON field; the first substring prior to the
dot being the domain; and the rest that follows being called the command:

	method = "<domain>.<command>"

This naming seems to be supported by chrome-remote-interface:

	https://github.com/cyrus-and/chrome-remote-interface/blob/master/lib/api.js#L32

Differential Revision: https://phabricator.services.mozilla.com/D25946

--HG--
extra : moz-landing-system : lando
2019-04-04 11:35:24 +00:00
Alexandre Poirot 2a852a9ba6 Bug 1539210 - Document TabSession and Session constructor arguments. r=ato
Depends on D25578

Differential Revision: https://phabricator.services.mozilla.com/D25770

--HG--
extra : moz-landing-system : lando
2019-04-04 11:29:31 +00:00
Alexandre Poirot d26882a9f4 Bug 1539210 - Do not destroy the content process session on page unload. r=ato
A session is bound to a browsing context, not just one document.
`unload` is fired when navigating to another document. The document goes
away, but not the browsing context. So, we should keep the session up and running
when the current document is destroyed and we navigate to another URL.

Depends on D25577

Differential Revision: https://phabricator.services.mozilla.com/D25578

--HG--
extra : moz-landing-system : lando
2019-04-04 11:29:29 +00:00
Alexandre Poirot a9c172506d Bug 1539210 - Add support for Target.sendMessageToTarget and Target.receivedMessageFromTarget. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D25577

--HG--
extra : moz-landing-system : lando
2019-04-04 11:29:27 +00:00
Alexandre Poirot 5cae2c807d Bug 1539221 - Register main process target on server start. r=ato
Depends on D25556

Differential Revision: https://phabricator.services.mozilla.com/D25557

--HG--
rename : remote/test/browser/browser_target.js => remote/test/browser/browser_main_target.js
extra : moz-landing-system : lando
2019-04-04 11:16:27 +00:00
Alexandre Poirot 969f088056 Bug 1539221 - Fix DOMContentLoadedPromise when the document is in a state between DOMContentLoaded and load event. r=ato
Depends on D25555

Differential Revision: https://phabricator.services.mozilla.com/D25556

--HG--
extra : moz-landing-system : lando
2019-04-04 11:16:25 +00:00
Alexandre Poirot f0c68a2092 Bug 1539221 - Fix piping of errors back to the client due to missing formatError symbol. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D25555

--HG--
extra : moz-landing-system : lando
2019-04-04 11:16:23 +00:00
Andreas Tolfsen 9936854ecf bug 1540684: remote: fix stray colons in error formatting; r=ochameau
Error messages contained extraneous colons that were inconsistent
with how JavaScript errors are usually formatted.

Examples of ill-formed formatting:

	FooError:

	FooError: bar:

The trailing colons should not be present in either of these cases.
Colons should only be printed when something follows.  For example:

	FooError

	FooError: bar

	FooError: bar:
		test.js:42

Differential Revision: https://phabricator.services.mozilla.com/D25608

--HG--
extra : moz-landing-system : lando
2019-04-04 09:55:14 +00:00
Andreas Tolfsen 924a19a629 bug 1540684: remote: write tests for Error.jsm's current behaviour; r=ochameau
remote/Error.jsm is completely untested and that is suboptimal.
This commit adds tests for remote/Error.jsm's current behaviour.

Note that the subsequent commits make some changes to this behaviour,
but it's a conscious decision to have tests before making those
behavioural changes.

Differential Revision: https://phabricator.services.mozilla.com/D25607

--HG--
extra : moz-landing-system : lando
2019-04-04 09:57:29 +00:00
Andreas Tolfsen 828d520cc2 bug 1537770: remote: default RemoteAgentError#notify() to print stack; r=ochameau
When remote/JSONHandler.jsm intercepts errors thrown during the
handling of an HTTP request, it is without except the underlying
cause of the problem you wish RemoteAgentError#notify() to give you.

Under no circumstances are you interested in where the error is re-thrown.

Differential Revision: https://phabricator.services.mozilla.com/D25617

--HG--
extra : moz-landing-system : lando
2019-04-03 11:42:08 +00:00
Alexandre Poirot 0b2e8e6e9d Bug 1539213 - Emit `Target.targetCreated` for already-opened tabs. r=ato
When `Target.setDiscoverTargets` is called, one `Target.targetCreated` event
should be sent per already opened tab.

Differential Revision: https://phabricator.services.mozilla.com/D25558

--HG--
extra : moz-landing-system : lando
2019-04-01 14:25:28 +00:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Andreea Pavel a7cd412f0e Merge mozilla-central to mozilla-inbound. on a CLOSED TREE 2019-03-22 18:51:53 +02:00
Andreas Tolfsen fe2449bf59 bug 1538187: remote: correct irc chatroom; r=me a=doc
DONTBUILD
2019-03-22 14:18:08 +00:00
Andreas Tolfsen 814d8ab46d bug 1538187: remote: fix hyperlinks in index; r=me a=doc
DONTBUILD
2019-03-22 14:18:07 +00:00
Andreas Tolfsen d71a2b110c bug 1538187: remote: correct chapter title in docs; r=me a=doc
DONTBUILD
2019-03-22 14:18:07 +00:00
Alexandre Poirot 26d0c79caa Bug 1536888 - Move the remote agent to a JSM. r=ato
This will later help register the component statically in bug 1536862.
And already ease using the remote agent from other JSM files.

Differential Revision: https://phabricator.services.mozilla.com/D24227

--HG--
rename : remote/RemoteAgent.js => remote/RemoteAgent.jsm
extra : moz-landing-system : lando
2019-03-22 09:46:50 +00:00