Currently when browser chrome tests are failing the open tabs, client,
and Remote Agent will never be closed, and as such each failing test
causes massive memory leaks.
Therefore the teardown logic needs to be moved out of the tests into
the "add_task()" function. Only that way we can make sure to run
all the clean-up steps independent of the test success state.
Differential Revision: https://phabricator.services.mozilla.com/D50233
--HG--
extra : moz-landing-system : lando
To ensure that the CDP server connection is always closed after a
test even when it is failing, its lifetime has to be handled inside
the "add_task" function.
Currently if a test fails all the registered events and observer
notifications are getting leaked. This patch ensures that all of
those events and notifications are getting unregistered.
Differential Revision: https://phabricator.services.mozilla.com/D50232
--HG--
extra : moz-landing-system : lando
Due to some obvious bugs in the code of TabObserver.jsm the registered
targets for each of the window's tabs haven't been unregistered when
the window has been closed.
It has the effect that when closing the Remote Agent the browsingContext
of the tab target, which has to be destroyed, cannot be retrieved.
Instead an error is raises, because the underlying frameLoader actually
doesn't exist anymore.
Given that "TabClose" events aren't fired when the window closes,
those have to be emulated.
Differential Revision: https://phabricator.services.mozilla.com/D50231
--HG--
extra : moz-landing-system : lando
This also fixes the intermittent timeout on Windows debug by
moving the event checks to a separate test.
Differential Revision: https://phabricator.services.mozilla.com/D49995
--HG--
rename : remote/test/browser/browser_input_dispatchKeyEvent.js => remote/test/browser/input/browser_dispatchKeyEvent.js
rename : remote/test/browser/browser_input_dispatchKeyEvent_race.js => remote/test/browser/input/browser_dispatchKeyEvent_race.js
rename : remote/test/browser/browser_input_dispatchMouseEvent.js => remote/test/browser/input/browser_dispatchMouseEvent.js
rename : remote/test/browser/doc_input_dispatchKeyEvent_race.html => remote/test/browser/input/doc_dispatchKeyEvent_race.html
rename : remote/test/browser/doc_input_events.html => remote/test/browser/input/doc_events.html
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
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