Commit Graph

17 Commits

Author SHA1 Message Date
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
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
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
Andreas Tolfsen
0d03682458 bug 1534827: remote: fix constants in transitionToLoadFlag; r=yulia
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
2019-03-13 14:35:57 +00:00
Alexandre Poirot
a7f9d31d4c Bug 1533682 - Implements empty domains used by puppeteer. r=ato
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
2019-03-11 12:51:09 +00:00
Alexandre Poirot
2bdbc39239 Bug 1533682 - Implements more Target/Page methods/events to support puppeteer's browser.newPage. r=ato
Depends on D22694

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

--HG--
extra : moz-landing-system : lando
2019-03-11 12:50:26 +00:00
Alexandre Poirot
2d9789224a Bug 1533679 - Implement very first Target domains. r=ato
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
2019-03-10 12:51:11 +00:00
Alexandre Poirot
416760c48b Bug 1533679 - Differentiate Sessions and Targets bound to a browser-element from the others. r=ato
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
2019-03-10 12:51:09 +00:00
Alexandre Poirot
dbd2284055 Bug 1533679 - Implement Browser.close. r=ato
Depends on D22689

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

--HG--
extra : moz-landing-system : lando
2019-03-10 12:51:05 +00:00
Alexandre Poirot
e795d282ef Bug 1533679 - Make content process domains to inherit from specialized ContentProcessDomain class. r=ato
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
2019-03-10 12:51:01 +00:00
Alexandre Poirot
0b0c48c862 Bug 1533679 - Remove unused target argument passed to Domain constructor. r=ato
Depends on D22684

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

--HG--
extra : moz-landing-system : lando
2019-03-10 12:50:55 +00:00
Andreas Tolfsen
924042fad6 bug 1523104: remote: drop unused functions in Browser domain; r=ochameau 2019-03-08 16:28:12 +00:00
Andreas Tolfsen
3a35f84eb8 bug 1523104: remote: refactor Domains to not extend Map and wean us off custom EventEmitter; r=ochameau 2019-03-08 16:27:25 +00:00
Andreas Tolfsen
4fb35b3d0a bug 1523104: remote: refactor Session#dispatch; r=ochameau 2019-03-08 16:27:23 +00:00
Andreas Tolfsen
a91a7da5b6 bug 1523104: remote: test that method own property on domain class is function; r=ochameau 2019-03-08 16:27:19 +00:00
Alexandre Poirot
8a01f77453 bug 1523104: remote: allow Domains to be implemented in either parent or content processes; r=ato 2019-03-08 16:27:15 +00:00