This patch adds basic support for retrieving cookies,
which means that it returns the cookies for the currently
active target.
Hereby it has the following limitations:
1. It does not walk the frame tree, and as such only returns
the cookies from the top-level frame. Support for that will
be added once frames can correctly be handled, which means
once support for the JSWindowActor API has been landed.
2. The "urls" parameter is not supported because it is
unclear right now what it actually does. More investigation
is necessary before any implementation can happen.
3. There is no support for the file:// protocol yet.
4. Dot domains aren't taken care of yet.
Differential Revision: https://phabricator.services.mozilla.com/D57614
--HG--
extra : moz-landing-system : lando
The browser-chrome test name is derived from the function name.
The function name of the original task is lost when wrapped inside
the add_task() override in remote/test/browser/head.js.
This fixes the problem by rewriting the taskFn name on the new wrapper.
Differential Revision: https://phabricator.services.mozilla.com/D57079
--HG--
extra : moz-landing-system : lando
The documentation for the overridden add_task() is quite poor.
Document it as to not confuse new developers why it is behaving
differently to the default bc add_task().
DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D57078
--HG--
extra : moz-landing-system : lando
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 is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
--HG--
extra : moz-landing-system : lando
Adds browser-chrome tests for the main entry point of the remote
agent, nsIRemoteAgent.
add_agent_task() wraps add_plain_task() (which again wraps the
original add_task()) so we can ensure that the agent isn't listening
before a test runs, and that any modified state such as preferences
is reset afterwards.
The tests rely heavily on the assumption that nsIRemoteAgent.close()
behaves as a no-op when the server is not listening.
This patch is a follow-up to bug 1590828.
Differential Revision: https://phabricator.services.mozilla.com/D55456
--HG--
extra : moz-landing-system : lando
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
--HG--
extra : moz-landing-system : lando
This does not support the grantUniversalAccess parameter.
It just creates a new execution context.
Differential Revision: https://phabricator.services.mozilla.com/D55169
--HG--
extra : moz-landing-system : lando
As noted in Bug 1602083, the CDP viewer implies that execution context management
is independent of the Runtime domain, which makes sense with the behaviour of methods
like Page.createIsolatedWorld.
This is a first step in that direction.
Depends on D55168
Differential Revision: https://phabricator.services.mozilla.com/D56279
--HG--
extra : moz-landing-system : lando
Dismantle the assumption that there is one ExecutionContext per
inner window and generate a fresh id for each ExecutionContext
rather than reusing the inner window id.
Differential Revision: https://phabricator.services.mozilla.com/D55168
--HG--
extra : moz-landing-system : lando
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
--HG--
extra : moz-landing-system : lando
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
--HG--
extra : moz-landing-system : lando
Adds browser-chrome tests for the main entry point of the remote
agent, nsIRemoteAgent.
add_agent_task() wraps add_plain_task() (which again wraps the
original add_task()) so we can ensure that the agent isn't listening
before a test runs, and that any modified state such as preferences
is reset afterwards.
The tests rely heavily on the assumption that nsIRemoteAgent.close()
behaves as a no-op when the server is not listening.
This patch is a follow-up to bug 1590828.
Differential Revision: https://phabricator.services.mozilla.com/D55456
--HG--
extra : moz-landing-system : lando
Now that the security review in bug 1542229 and the follow-up work
that came out of it is complete, we should go ahead and flip the
remote.enabled preference.
This patch causes the remote agent to be available to users on the
Firefox Nightly release channel. This meansusing --remote-debugger
will no longer cause a fatal error
Differential Revision: https://phabricator.services.mozilla.com/D55137
--HG--
extra : moz-landing-system : lando
This event is currently sent for each and every message,
and as such duplicates every log entry as displayed when
having the Puppeteer debug logs turned on.
Until we can fix it to behave correctly, it should be
disabled.
Differential Revision: https://phabricator.services.mozilla.com/D54273
--HG--
extra : moz-landing-system : lando
Full SHA-1: 2fff4ea08428842ad252a72bb3af30ab107fbd6c
Contains two commits reverting the stderr workaround, now that bug
1590826 prints to stderr.
Differential Revision: https://phabricator.services.mozilla.com/D54271
--HG--
extra : moz-landing-system : lando
The method under the Network domain is a redirect to
Emulation only. It might be deprecated, but that's unclear
in the current documentation.
Differential Revision: https://phabricator.services.mozilla.com/D52929
--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
By using loadSubScript() instead of injecting a script node
into the hidden window, the content of chrome-remote-interface.js
can be cached. Only the first load will take about 150ms, each
test afterward will only have to spend about 30ms in getCDP().
Differential Revision: https://phabricator.services.mozilla.com/D53073
--HG--
extra : moz-landing-system : lando
Using the minimized version reduces the file size from 880kB
to 550kB, which means lesser data to load and to cache.
Imported revision: f412dd1ed0028bcf9116918879b99924039d52e2
Differential Revision: https://phabricator.services.mozilla.com/D53072
--HG--
extra : moz-landing-system : lando
This sub-test has races which were exacerbated by making data: URLs load asynchronously. Disable it until the race can be resolved.
MANUAL PUSH: bustage fix on a CLOSED TREE
--HG--
extra : amend_source : 76c3d8486213b5829615059587f44f0db93b9041
The actual screenshot data should be returned via the "data"
property of an object. Also the data URL prefix has to be
stripped off, so that only the base64 encoded data will be
transmitted.
Differential Revision: https://phabricator.services.mozilla.com/D52144
--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
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
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
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
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
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
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
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
* 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