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
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
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
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
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
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
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
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
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
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
Doing this helps fixing the main target's path which is meant to be:
/devtools/browser
Depends on D24220
Differential Revision: https://phabricator.services.mozilla.com/D24221
--HG--
extra : moz-landing-system : lando
This fixes the browser mochitest which currently timesout when calling server.close()
It started to timeout when the patch related to websocket handshake landed.
Depends on D24219
Differential Revision: https://phabricator.services.mozilla.com/D24220
--HG--
extra : moz-landing-system : lando
In this revision it only helps sharing `handle`.
But in a followup changeset, it will also help closing all the connections
and justify the `sessions` map we keep around.
Differential Revision: https://phabricator.services.mozilla.com/D24219
--HG--
rename : remote/targets/MainProcessTarget.jsm => remote/targets/Target.jsm
extra : moz-landing-system : lando
The transitionType is converted into undefined because there is a typo
in the constants. These should be "FLAGS" rather than "FLAG".
Thanks-to: Mark Banner <standard8@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D23315
--HG--
extra : moz-landing-system : lando
DevTools :: Remote Agent was removed in favour of a new product,
Remote Protocol. This corrects the file metadata mapping for the
agent.
The patch also adds mapping for new domains. Not all of the
components exist yet, but this is tracked separately in
https://bugzilla.mozilla.org/show_bug.cgi?id=1534970.
Differential Revision: https://phabricator.services.mozilla.com/D23306
--HG--
extra : moz-landing-system : lando
Puppetteer enable all these domains. Implement enable methods in order to prevent it from crashing on that.
Depends on D22695
Differential Revision: https://phabricator.services.mozilla.com/D22696
--HG--
rename : remote/domains/ContentProcessDomains.jsm => remote/domains/content/Emulation.jsm
rename : remote/domains/ContentProcessDomains.jsm => remote/domains/content/Network.jsm
rename : remote/domains/ContentProcessDomains.jsm => remote/domains/content/Performance.jsm
rename : remote/domains/ContentProcessDomains.jsm => remote/domains/content/Runtime.jsm
rename : remote/domains/ContentProcessDomains.jsm => remote/domains/content/Security.jsm
extra : moz-landing-system : lando
In order to be able to query/instantiate sub targets like remote frames, or tab targets from the MainProcessTarget,
we have to support session at the protocol layer.
This is all based on a `sessionId` attribute put on all inbound/outbound messages.
This patch will be later used, once we start instantiating sub targets.
Differential Revision: https://phabricator.services.mozilla.com/D22694
--HG--
extra : moz-landing-system : lando
Empty methods that are necessary to make puppeteer.connect to pass without throwing.
Depends on D22692
Differential Revision: https://phabricator.services.mozilla.com/D22693
--HG--
rename : remote/domains/ParentProcessDomains.jsm => remote/domains/parent/Target.jsm
extra : moz-landing-system : lando
The Session used by MainProcessTarget isn't bound to any browser-element
and so do not use any of the message manager to pipe message to the content process.
Same for Target, the MainProcessTarget doesn't expose any browsing-context-related attribute.
Depends on D22691
Differential Revision: https://phabricator.services.mozilla.com/D22692
--HG--
rename : remote/sessions/Session.jsm => remote/sessions/TabSession.jsm
rename : remote/targets/Target.jsm => remote/targets/TabTarget.jsm
extra : moz-landing-system : lando
Introduces a new kind of target "main-process",
which is not bound to any particular browser-element/browsing-context.
This implements only a subtest of domains and typical won't support the "content" ones.
This will require some more work in order to acknowledge having multiple kinds of targets.
We will also have "worker", "addon" and remoted-frames which will be very similar to tabs.
Depends on D22690
Differential Revision: https://phabricator.services.mozilla.com/D22691
--HG--
extra : moz-landing-system : lando
Remove content, docShell and chromeEventHandler attribute from base Domain class
as these fields only work for domains implemented in the content process and
attached to a browsing context/document.
For "global" domains like Target or Browser, that are not bound to any document,
these properties won't work.
Depends on D22687
Differential Revision: https://phabricator.services.mozilla.com/D22688
--HG--
rename : remote/domains/Domain.jsm => remote/domains/ContentProcessDomain.jsm
extra : moz-landing-system : lando
This is going to help have different kind of session par target kind.
Depends on D22686
Differential Revision: https://phabricator.services.mozilla.com/D22687
--HG--
rename : remote/ContentProcessSession.jsm => remote/sessions/ContentProcessSession.jsm
rename : remote/Session.jsm => remote/sessions/Session.jsm
rename : remote/frame-script.js => remote/sessions/frame-script.js
extra : moz-landing-system : lando
This is going to help introduce multiple kind of targets.
Depends on D22685
Differential Revision: https://phabricator.services.mozilla.com/D22686
--HG--
rename : remote/Target.jsm => remote/targets/Target.jsm
rename : remote/Targets.jsm => remote/targets/Targets.jsm
extra : moz-landing-system : lando