To better keep track of available observer classes
it's better to have them all in the same folder.
While moving files around the patch also renames
the TabObserver module to TargetObserver, which
would allow us to add target observers for workers
in the future.
Differential Revision: https://phabricator.services.mozilla.com/D73042
This patch implements the IO.read() method to allow
reading streams for files and blobs.
Therefor all the methods in the IO domain need a registry
for streams. Those have to be stored globally because
they need to be kept existent across different client
connections.
Differential Revision: https://phabricator.services.mozilla.com/D55968
--HG--
extra : moz-landing-system : lando
This bootstraps the remote agent from Rust so that we have access
to write to stderr using the eprintln!() macro. There is a future
intention to expand Rust usage in the remote agent by delegating
CDP and WebDriver Bi-Di protocol schema validation to serde.
The Rust port is faithful to the JS version in terms of functionality,
and in some places improves on the original design by enforcing
a strict division between flag handling code on one hand, and the
remote agent server on the other.
Differential Revision: https://phabricator.services.mozilla.com/D50289
--HG--
extra : moz-landing-system : lando
This patch implements setting the user agent only. Support for
accepted language, and platform will be done in a follow-up bug.
Differential Revision: https://phabricator.services.mozilla.com/D52831
--HG--
extra : moz-landing-system : lando
This implements an all-or-nothing insecure sweeping override that
bypasses security exceptions when loading documents with invalid
or otherwise bad TLS certificates.
Differential Revision: https://phabricator.services.mozilla.com/D50838
--HG--
extra : moz-landing-system : lando
To allow for multiple client connections the ChannelEventSinkFactory
class only has to be registered once. By reference counting consumers
of this factory it can be made sure to only unregister it once no
consumers of the factory exist anymore.
With this refactoring we basically allow multiple client connections
to our CDP implementation.
Differential Revision: https://phabricator.services.mozilla.com/D49329
--HG--
extra : moz-landing-system : lando
* TabObserver is rather an helper class of Targets rather than RemoteAgent.
Targets is the class which holds all the targets and reports about their
creation and destructor. It feels legitimate to have it directly integrate
with TabObserver.
* To better sort of the files. i.e. avoid having "random files" in /remote/
I'm renaming and moving TabObserver according to its usage.
* We were emitting "connect" and "disconnect" event when a target was created
or destroyed. But this is misleading as there is no connection to anything
being made. Only later, a CDP client might connect to a target HTTP endpoint
and initiate a connection. These events are making this hard to understand
that the connection actually happens when Target.handle is called.
Differential Revision: https://phabricator.services.mozilla.com/D37043
--HG--
rename : remote/WindowManager.jsm => remote/targets/TabObserver.jsm
extra : moz-landing-system : lando
This helps sharing a single implementation of how the JSON objects
are read and written from/to the WebSocket connection.
Also, by delegating the command calls to the Session via `Session.execute`
and expecting a promise with a resolution or rejection, we make error
handling of command calls clearer and unified.
Differential Revision: https://phabricator.services.mozilla.com/D37046
--HG--
extra : moz-landing-system : lando
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
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
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
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
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
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
Rather than spinning up a separate WebSocket listener for each target, this
enables us to serve WebSocket connections from the original HTTPD that we serve
the rest of the JSON API from.