Similar to all the other test jobs also the Puppeteer jobs should
not run in headless by default. Instead it should be an opt-in.
Differential Revision: https://phabricator.services.mozilla.com/D48823
--HG--
extra : moz-landing-system : lando
In order to get the browser_page_frameNavigated.js and
browser_page_frameNavigated_iframe.js tests passing under Fission
we can load the test resources from the same site origin as the
initial test document. This avoids a content browser remoteness
change, which strictly speaking is not what the tests are testing.
Differential Revision: https://phabricator.services.mozilla.com/D47897
--HG--
extra : moz-landing-system : lando
This makes it possible to for mach to determine which test types
are likely to be relevant.
Differential Revision: https://phabricator.services.mozilla.com/D37014
--HG--
extra : moz-landing-system : lando
We vendor the Puppeteer library, but not its dependencies.
When "npm install" is called in remote/test/puppeteer/, it puts
its dependencies under remote/test/puppeteer/node_modules/ and
generates a remote/test/puppeteer/package-lock.json file. We do
not want these to be checked in.
DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D37010
--HG--
extra : moz-landing-system : lando
Introduces "./mach puppeteer-test" command for running the Puppeteer
tests against the remote agent. This has to be a top-level command
because the automatic test detection system in mach does not allow
us to delegate to a subcommand such as "./mach remote puppeteer-test".
The tests run against a fork of Puppeteer with hotfixes needed for
it to work with the CDP implementation in Firefox. This fork is
located at https://github.com/andreastt/puppeteer/tree/firefox, and
vendored under remote/test/puppeteer/ in a previous commit in this series.
Differential Revision: https://phabricator.services.mozilla.com/D37009
--HG--
extra : moz-landing-system : lando
Puppeteer is licensed under the Apache-2.0 license.
No code from Puppeteer gets included in Firefox.
Differential Revision: https://phabricator.services.mozilla.com/D37008
--HG--
extra : moz-landing-system : lando
Introduces "./mach remote vendor-puppeteer" for vendoring the
Puppeteer client without dependencies into remote/test/puppeteer/.
The particular checkout of Puppeteer is
https://github.com/andreastt/puppeteer/tree/firefox, which contains a
couple of hotfixes we need for the client to work with the Firefox
implementation of CDP.
The remote agent targets a specific version of Puppeteer, so it is
not suitable for this to be vendored under third_party/. We also
wouldn't want other code in central to accidentally use a patched fork.
The vendoring process is not part of "./mach vendor" because it does
not yet have Node.js support, and implementing that for mach is outside
the scope of getting the Puppeteer tests running with the remote agent.
Differential Revision: https://phabricator.services.mozilla.com/D37007
--HG--
extra : moz-landing-system : lando
This makes prefs definition simpler, more consistent, and less error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D41324
--HG--
extra : moz-landing-system : lando
Currently, TabGroups know to break their reference cycles only when the last
window leaves them. For TabGroups which have never had a window join (which
happens under Fission), this means they also never see a window leave, and
therefore never break their reference cycles, and leak.
This patch adds a check to break reference cycles if no windows have joined by
the time a BrowserChild they belong to is destroyed.
MANUAL PUSH: Lando fails to rebase.
Differential Revision: https://phabricator.services.mozilla.com/D40669
--HG--
extra : source : 03acb28ab60fb77fa06064385a62cc46cf4ad1bd
extra : amend_source : 0a71625d99951bebe45ee6f62570de491a714e97
For many browser-chrome (bc) tests is does not matter what the
document is, as long as it is does not cause state to bleed over
from the previous test.
For these cases this patch introduces a shorthand, setup(), which
calls setupForURL(url) with an empty document generated by toDataURL("").
Differential Revision: https://phabricator.services.mozilla.com/D40216
--HG--
extra : moz-landing-system : lando
Per the URL standard, we should avoid talking about URIs (and indeed
URI, URN, et al.) since the term only serves to mislead.
Differential Revision: https://phabricator.services.mozilla.com/D40215
--HG--
extra : moz-landing-system : lando
For many browser-chrome (bc) tests is does not matter what the
document is, as long as it is does not cause state to bleed over
from the previous test.
For these cases this patch introduces a shorthand, setup(), which
calls setupForURL(url) with an empty document generated by toDataURL("").
Differential Revision: https://phabricator.services.mozilla.com/D40216
--HG--
extra : moz-landing-system : lando
Per the URL standard, we should avoid talking about URIs (and indeed
URI, URN, et al.) since the term only serves to mislead.
Differential Revision: https://phabricator.services.mozilla.com/D40215
--HG--
extra : moz-landing-system : lando
Some local adaptions have been made, but this is mostly functionally
equivalent.
Differential Revision: https://phabricator.services.mozilla.com/D39687
--HG--
extra : moz-landing-system : lando
Introduces helper function, toDataURL(), that takes a document
extract and produces a data URL with the necessary properties for
Gecko to recognise it as an HTML document with the correct media type.
This has the benefit that HTML fragments and tags such as < and > are
encoded correctly, which is an obvious safety-win, and subsequently
that documents can be created on-the-fly with minimal code.
It will be possible to extend this function for other document types,
such as XHTML, XML, and even binary formats, as needed in the future.
Differential Revision: https://phabricator.services.mozilla.com/D39686
--HG--
extra : moz-landing-system : lando
If the contextId parameter is omitted when calling Runtime.evaluate,
the expression will be performed in the context of the currently
inspected page.
Differential Revision: https://phabricator.services.mozilla.com/D36823
--HG--
extra : moz-landing-system : lando
When a test crashes, the harness skips all of the remaining tests in the
directory. That means that with crashes skipped, we now try to run a whole lot
more tests than we did before, and a lot of them fail under Fission.
This patch adds annotations to the new failures that show up after part 1.
Differential Revision: https://phabricator.services.mozilla.com/D38726
--HG--
extra : rebase_source : 292157039c88fc615f5de41679e96e72766ac4db
Connection already saves the list of Session, so it is more natural
to save it only once there and instead directly close the connections
from Target. Each connection is going to cleanup all related sessions.
I also stop automatically registering the session to the connection from Session constructor,
it felt not explicit enough.
Differential Revision: https://phabricator.services.mozilla.com/D37045
--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
My preference was to annotate most of the failing tests with `fail-if` so that
if they start passing, the `fail-if` needs to be removed and they need to keep
passing. That doesn't work for tests that timeout, or which trigger failures
from their cleanup functions, however, so those tests need skip-if. And tests
with fail in their cleanup functions likely leave the browser in an
inconsistent state for subsequent tests, anyway, so really should be skipped
regardless.
There are some remaining tests which still fail because of crashes. I chose
not to skip them here, but to fix the crashes in separate bugs instead.
Differential Revision: https://phabricator.services.mozilla.com/D38247
--HG--
extra : rebase_source : 39ba8fec2e882cfe577c5f2b58ab7e4b461f1178
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
Connect and disconnect in misleading here as a target aren't connected/disconnected,
but instead, being unregistered and destroyed. The fact that they are "disconnected"
is a side effect of this destruction. Also note that a Target is never "connected",
it is only a Connection and its related sessions which really are connected to a remote client.
Differential Revision: https://phabricator.services.mozilla.com/D37042
--HG--
extra : moz-landing-system : lando