Граф коммитов

583 Коммитов

Автор SHA1 Сообщение Дата
Maja Frydrychowicz 8d42f7b01d Bug 1597877 - Make Runtime.enable/disable control notifications only; r=remote-protocol-reviewers,whimboo,ato
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
2019-12-09 21:52:10 +00:00
Maja Frydrychowicz af77524cfd Bug 1597877 - Allow many ExecutionContexts per inner window; r=remote-protocol-reviewers,ato,whimboo
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
2019-12-09 21:51:25 +00:00
Maja Frydrychowicz 838ecc262c Bug 1597877 - Identify internal methods in Runtime domain; r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D55167

--HG--
extra : moz-landing-system : lando
2019-12-09 21:50:39 +00:00
Maja Frydrychowicz bb71375e46 Bug 1597877 - Report name, origin, type in Runtime.executionContextCreated; r=remote-protocol-reviewers,ato,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D55166

--HG--
extra : moz-landing-system : lando
2019-12-09 21:49:56 +00:00
Maja Frydrychowicz aa3a55d740 Bug 1597877 - Make frameId a string; r=remote-protocol-reviewers,ato,whimboo
According to the CDP viewer, the type of FrameId is string.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 21:49:06 +00:00
Noemi Erli 82d41a33b2 Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione fa3556c3fc Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:34 +00:00
Kris Maglione 910eab35d2 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
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
2019-12-07 19:11:58 +00:00
Daniel Varga 84a601a6d4 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione b5238224ba Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:22 +00:00
Kris Maglione 20da940e14 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
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
2019-12-06 22:14:14 +00:00
Andreas Tolfsen 6eca1da818 bug 1590828: remote: take appropriate action on errors during startup r=remote-protocol-reviewers,maja_zf,whimboo
Now that nsIRemoteAgent propagates errors correctly to Rust we can
report errors back to the user when something terrible happens.

The effect of all this is that the startup handler can stop Firefox
when the remote agent fails to listen.

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

--HG--
extra : moz-landing-system : lando
2019-12-04 18:26:38 +00:00
Andreas Tolfsen 22560f18d6 bug 1590828: remote: return NS exceptions from nsIRemoteAgent r=remote-protocol-reviewers,whimboo,maja_zf
The nsIRemoteAgent interface introduced with bug 1543115 did
not change the exceptions thrown internally by the class. To ensure
better interaction with consumers over XPIDL we should ensure the
JS implementation throws NS exceptions.

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

--HG--
extra : moz-landing-system : lando
2019-12-04 18:26:36 +00:00
Andreas Tolfsen 5602f61d54 bug 1600121: remote: rely on nsIHttpServer.registerPathHandler to assert path r=remote-protocol-reviewers,maja_zf,whimboo
As nsIHttpServer.registerPathHandler now checks that the path is
not empty we can drop our pre-check when target-created is handled.

If target.path does happen to be empty an error is printed to the console.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 09:38:17 +00:00
Andreas Tolfsen a217b583f9 bug 1600111: remote: make nsIRemoteAgent.listen() sync r=remote-protocol-reviewers,maja_zf
Interfaces exposed over XPIDL cannot be marked async, otherwise their
return values get lost.  This patch makes nsIRemoteAgent.listen()
synchronous by removing the use of async/await.

Unfortunately Rust does not yet support deserialising promises sent across
XPIDL, documented in https://bugzilla.mozilla.org/show_bug.cgi?id=1512319.

In an effort to retain the original API internally the function
now returns a promise.  This means the function can be awaited in
JS only, which we make use of in remote/test/browser/head.js.

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

--HG--
extra : moz-landing-system : lando
2019-12-04 11:57:13 +00:00
Andreas Tolfsen 629a3a47dc bug 1600111: remote: make nsIRemoteAgent.close() sync r=remote-protocol-reviewers,whimboo,maja_zf
Interfaces exposed over XPIDL cannot be marked async, otherwise their
return values get lost.  This patch makes nsIRemoteAgent.close()
synchronous by removing the use of async/await.

Unfortunately Rust does not yet support deserialising promises sent
across XPIDL, so in an effort to retain the original API internally
the function now returns a promise.  This means the function can be
awaited in JS only, which we make use of in remote/test/browser/head.js.

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

--HG--
extra : moz-landing-system : lando
2019-12-04 11:57:06 +00:00
Gurzau Raul faac976002 Backed out 2 changesets (bug 1600330) for failing at browser_agent.js on a CLOSED TREE.
Backed out changeset eef79aaf5378 (bug 1600330)
Backed out changeset 695a3213e7fd (bug 1600330)
2019-12-03 21:27:59 +02:00
Andreas Tolfsen 0f621413ba bug 1600330: remote: test nsIRemoteAgent r=remote-protocol-reviewers,maja_zf,whimboo
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
2019-12-03 17:13:47 +00:00
Andreas Tolfsen 761c037d51 bug 1600330: remote: add fail() browser-chrome test helper r=remote-protocol-reviewers,maja_zf
fail() will cause a test assertion failure equivalent to ok(false).

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:09:27 +00:00
Andreas Tolfsen c0c59383f9 bug 1544393: remote: ship remote agent in Firefox Nightly r=remote-protocol-reviewers,whimboo,maja_zf
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
2019-12-02 15:39:51 +00:00
Henrik Skupin 50ad3cd134 Bug 1600317 - [remote] Deny internal methods to be called. r=remote-protocol-reviewers,maja_zf
As long as we do not validate incoming messages against the
Chrome DevTools JSON schema, all incoming commands would be
executed. To prevent clients from changing internal data by
calling internal commands (prefixed with "_"), deny their
execution.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 14:28:13 +00:00
Andreas Tolfsen 3ea9c9f00c bug 1600081: remote: correct build instructions for startup r=remote-protocol-reviewers,whimboo
With bug 1543115 we saw a rewrite of the startup code path in the
remote agent.  It forgot to update the build instructions to mention
that changes to the Rust code requires you to have a full build available.

DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-11-28 19:42:58 +00:00
Andreas Tolfsen bce9bee5cc bug 1590827: remote, browser: request remote agent startup; r=florian,remote-protocol-reviewers,maja_zf
This moves the Chromium remote debugging protocol implementation
in Firefox from using sessionstore-windows-restored to a new
remote-startup-requested notification observer.

This change makes it possible for applications to explicitly decide
at which stage it is considered safe to initialise the remote agent
listener.  It is safe to emit this notification at any time since
the observer for it is only registered after the --remote-debugger
flag is is used.

The remote debugger only supports Firefox, so this patch does not
take care of GeckoView/Android.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 19:56:44 +00:00
Maja Frydrychowicz 10c450f91f Bug 1596888 - (remote) vendor Puppeteer to 8b49dc6
Differential Revision: https://phabricator.services.mozilla.com/D54941

--HG--
extra : moz-landing-system : lando
2019-11-27 14:38:28 +00:00
Andreas Tolfsen 86fc45b83b bug 1599400: remote: vendor puppeteer to c5a72e9
This contains maja_zf's browser picker changes.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 11:33:44 +00:00
Mihai Alexandru Michis 0dc4b7231c Bug 1598971 - Fix spell lint failures. a=lint-fix CLOSED TREE
--HG--
extra : amend_source : 7f3391519a009242cabef46a5ebe50d451aee8b8
2019-11-26 12:21:18 +02:00
Sylvestre Ledru ba488cdc09 Bug 1598971 - codespell: Fix typos in the doc r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,ato
Depends on D54430

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

--HG--
extra : moz-landing-system : lando
2019-11-25 10:06:12 +00:00
Henrik Skupin 656a009825 Bug 1598468 - [remote] Temporarily stop emitting the "Target.receivedMessageFromTarget" event. r=remote-protocol-reviewers,ato
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
2019-11-25 15:34:24 +00:00
Maja Frydrychowicz 19c3ac33fe Bug 1596888 - (Puppeteer) Add automation preferences Firefox profile; r=remote-protocol-reviewers,ato,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D53952

--HG--
extra : moz-landing-system : lando
2019-11-25 16:16:40 +00:00
Andreas Tolfsen 7996622408 bug 1590826: remote: vendor puppeteer 2fff4ea; r=remote-protocol-reviewers,maja_zf
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
2019-11-22 21:53:54 +00:00
Andreas Tolfsen 36f394af15 bug 1543115: remote, toolkit: bootstrap from Rust; r=remote-protocol-reviewers,maja_zf
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
2019-11-22 08:03:21 +00:00
Andreas Tolfsen 4a8b5c26b8 bug 1543115: remote: expose nsIRemoteAgent as XPCOM service; r=remote-protocol-reviewers,maja_zf,nika
This change makes it possible to access the remote agent service
from C++ and Rust.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 08:03:19 +00:00
Andreas Tolfsen 967406480d bug 1543115: remote: introduce nsIRemoteAgent XPIDL interface; r=remote-protocol-reviewers,maja_zf
Adds an XPIDL interface for the remote agent which we will later use to
initialise and start it from a new command-line handler written in Rust.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 08:03:12 +00:00
Andreas Tolfsen 9c0f6722a6 bug 1543115: remote: make RemoteAgent.listen() accept strings; r=remote-protocol-reviewers,maja_zf
Crafting nsIURIs in Rust is complicated.  Allow RemoteAgent.listen()
to accept both strings and nsIURIs when called in JavaScript.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 08:03:10 +00:00
Andreas Tolfsen 7c06462151 bug 1543115: remote: emit "remote-listening" system notification on startup; r=remote-protocol-reviewers,maja_zf
When calling RemoteAgent.listen() across XPIDL the function is run
asynchronously.  In order to find out when the remote agent has started
listening we introduce a "remote-listening" system observer notification.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 08:03:08 +00:00
Andreas Tolfsen 3f618e2eda bug 1543115: remote: set needed prefs earlier at startup; r=remote-protocol-reviewers,maja_zf
Although it currently makes no difference, we should ensure the
required preferences are set sooner, in case any of the internal
remote agent features depend on it.

Because we also cannot control when the nsICommandLineHandler for
the remote agent is invoked, setting it sooner rather than later,
seems a lot safer.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 08:03:05 +00:00
Andreas Tolfsen d25d3a1256 bug 1543115: remote: make RemoteAgent.close() safer; r=remote-protocol-reviewers,maja_zf
close() is meant to be failsafe in the sense that it should be
possible to call without side-effects.

We are currently setting up a lot of state in listen() that is not
cleaned up if the server eventually fails to start.  Calling close()
when this happens will ensure any state listen() has accrued is reset.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 08:03:03 +00:00
Andreas Tolfsen 795f248c54 bug 1543115: remote: merge init() and listen(); r=remote-protocol-reviewers,maja_zf
Having init() as a separate function leads to inconsistencies about
how the required state is checked.

init() prevents the remote agent from being loaded when the
remote.enabled preference is false or it is attempted loaded into a
child process, but listen() already manipulates state before these
checks are run.  This is probably not the intention, but an easy
mistake to make when the code flow is not crystal clear.

Since we never have a need to call init() independently, this patch
merges init() into listen().

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

--HG--
extra : moz-landing-system : lando
2019-11-22 08:02:56 +00:00
Andreas Tolfsen 2cf78c4ad5 bug 1543115: remote: rename XPCOM manifest for conformity; r=remote-protocol-reviewers,maja_zf
All other XPCOM component manifests are named components.conf and
this makes the remote agent's conform with those.

It will also become apparent in a later patch in this changeset
that we need to register two XPCOM components: one implementing
the remote agent service, and one for handling command-line arguments.

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

--HG--
rename : remote/RemoteAgent.conf => remote/components.conf
extra : moz-landing-system : lando
2019-11-22 08:02:54 +00:00
danwalsh99 da48b9cb49 Bug 1590358 - [remote] Replace static assertions in browser chrome tests with info(), r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D53352

--HG--
extra : moz-landing-system : lando
2019-11-21 13:25:46 +00:00
Henrik Skupin e02cc0bfe1 Bug 1597253 - [remote] Implement Page.lifecycleEvent. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D53827

--HG--
extra : moz-landing-system : lando
2019-11-19 22:08:05 +00:00
Henrik Skupin 88538854d7 Bug 1597259 - [remote] Implement Page.setLifecycleEventsEnabled. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D53826

--HG--
extra : moz-landing-system : lando
2019-11-19 19:42:18 +00:00
Henrik Skupin 26e6d7493a Bug 1597643 - [remote] Implement Page.frameStartedLoading. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D53825

--HG--
extra : moz-landing-system : lando
2019-11-19 19:39:37 +00:00
Oana Pop Rus 0d270ac364 Backed out changeset 4f9ddcc4d7d0 (bug 1590358) for mochitest remote failures in browser_dispatchMouseEvent.js on a CLOSED TREE 2019-11-19 16:50:42 +02:00
Daniel Varga 420bc7e3b5 Backed out 9 changesets (bug 1543115) for build bustage with fatal error: 'nsIRemoteAgent.h' file not found. On a CLOSED TREE
Backed out changeset df184d5f766a (bug 1543115)
Backed out changeset 0316a7fa9d37 (bug 1543115)
Backed out changeset 99ae1cdbaa69 (bug 1543115)
Backed out changeset 825f6b55865a (bug 1543115)
Backed out changeset 6480cdbd004c (bug 1543115)
Backed out changeset 4ecb2e70e855 (bug 1543115)
Backed out changeset 76ebc0f74bff (bug 1543115)
Backed out changeset 8a931eb7b0c8 (bug 1543115)
Backed out changeset 72c162fff80c (bug 1543115)

--HG--
rename : remote/components.conf => remote/RemoteAgent.conf
2019-11-19 15:54:15 +02:00
danwalsh99 41f66d6264 Bug 1590358 - Replace static assertions in browser chrome tests with info(), r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D53352

--HG--
extra : moz-landing-system : lando
2019-11-19 13:37:34 +00:00
Andreas Tolfsen d79e42a0ef bug 1543115: remote: bootstrap from Rust; r=remote-protocol-reviewers,maja_zf
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
2019-11-19 12:33:06 +00:00
Andreas Tolfsen 2cb1328cc1 bug 1543115: remote: expose nsIRemoteAgent as XPCOM service; r=remote-protocol-reviewers,maja_zf,nika
This change makes it possible to access the remote agent service
from C++ and Rust.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 12:32:51 +00:00
Andreas Tolfsen 24f7b88ad4 bug 1543115: remote: introduce nsIRemoteAgent XPIDL interface; r=remote-protocol-reviewers,maja_zf
Adds an XPIDL interface for the remote agent which we will later use to
initialise and start it from a new command-line handler written in Rust.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 12:32:48 +00:00
Andreas Tolfsen e02175a9ab bug 1543115: remote: make RemoteAgent.listen() accept strings; r=remote-protocol-reviewers,maja_zf
Crafting nsIURIs in Rust is complicated.  Allow RemoteAgent.listen()
to accept both strings and nsIURIs when called in JavaScript.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 12:32:46 +00:00
Andreas Tolfsen e29e510bb0 bug 1543115: remote: emit "remote-listening" system notification on startup; r=remote-protocol-reviewers,maja_zf
When calling RemoteAgent.listen() across XPIDL the function is run
asynchronously.  In order to find out when the remote agent has started
listening we introduce a "remote-listening" system observer notification.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 12:32:44 +00:00
Andreas Tolfsen a293581c87 bug 1543115: remote: set needed prefs earlier at startup; r=remote-protocol-reviewers,maja_zf
Although it currently makes no difference, we should ensure the
required preferences are set sooner, in case any of the internal
remote agent features depend on it.

Because we also cannot control when the nsICommandLineHandler for
the remote agent is invoked, setting it sooner rather than later,
seems a lot safer.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 12:32:41 +00:00
Andreas Tolfsen a30223fe5e bug 1543115: remote: make RemoteAgent.close() safer; r=remote-protocol-reviewers,maja_zf
close() is meant to be failsafe in the sense that it should be
possible to call without side-effects.

We are currently setting up a lot of state in listen() that is not
cleaned up if the server eventually fails to start.  Calling close()
when this happens will ensure any state listen() has accrued is reset.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 12:32:39 +00:00
Andreas Tolfsen 17705e0460 bug 1543115: remote: merge init() and listen(); r=remote-protocol-reviewers,maja_zf
Having init() as a separate function leads to inconsistencies about
how the required state is checked.

init() prevents the remote agent from being loaded when the
remote.enabled preference is false or it is attempted loaded into a
child process, but listen() already manipulates state before these
checks are run.  This is probably not the intention, but an easy
mistake to make when the code flow is not crystal clear.

Since we never have a need to call init() independently, this patch
merges init() into listen().

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

--HG--
extra : moz-landing-system : lando
2019-11-19 12:32:31 +00:00
Andreas Tolfsen 5b844c0aa5 bug 1543115: remote: rename XPCOM manifest for conformity; r=remote-protocol-reviewers,maja_zf
All other XPCOM component manifests are named components.conf and
this makes the remote agent's conform with those.

It will also become apparent in a later patch in this changeset
that we need to register two XPCOM components: one implementing
the remote agent service, and one for handling command-line arguments.

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

--HG--
rename : remote/RemoteAgent.conf => remote/components.conf
extra : moz-landing-system : lando
2019-11-19 12:32:29 +00:00
Henrik Skupin dfa891644c Bug 1596101 - [remote] Forward Network.setUserAgentOverride to Emulation.setUserAgentOverride. r=remote-protocol-reviewers,maja_zf
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
2019-11-18 10:07:42 +00:00
Henrik Skupin 727713505e Bug 1595697 - [remote] Implement basic support for Emulation.setUserAgentOverride. r=remote-protocol-reviewers,maja_zf
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
2019-11-18 10:07:38 +00:00
Henrik Skupin 2618f63395 Bug 1595112 - [remote] Cache chrome-remote-interface.js between browser chrome tests. r=remote-protocol-reviewers,ato
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
2019-11-15 14:57:51 +00:00
Henrik Skupin b39004d89f Bug 1595112 - [remote] Import minimized version of chrome-remote-interface.js. r=remote-protocol-reviewers,ato
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
2019-11-15 14:57:36 +00:00
Andreas Tolfsen 615400cd7a bug 1596729: remote: document ObserverService logging
DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-11-15 13:42:22 +00:00
JaStenson e460584f4c Bug 1591989 - [remote] Don't use 'frameId' for Page.loadEventFired event. r=whimboo,remote-protocol-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D53046

--HG--
extra : moz-landing-system : lando
2019-11-14 21:22:16 +00:00
Henrik Skupin afa1129d06 Bug 1595528 - [remote] Add local Chromium folder to ignore list. r=remote-protocol-reviewers,maja_zf
Depends on D52740

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

--HG--
extra : moz-landing-system : lando
2019-11-12 21:19:11 +00:00
Henrik Skupin 1cdb056d30 Bug 1595528 - [remote] Vendor in latest puppeteer changes. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D52740

--HG--
extra : moz-landing-system : lando
2019-11-12 21:18:49 +00:00
Henrik Skupin ef21b9b3af Bug 1594871 - [remote] Callers of loadURL() in browser_captureScreenshot.js have to use await. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D52353

--HG--
extra : moz-landing-system : lando
2019-11-08 13:35:24 +00:00
Maja Frydrychowicz 5237b5f25c Bug 1590467 - Use new testing options in puppeteer-test mach command; r=remote-protocol-reviewers,ato
This takes advantage of the browser-selection patch proposed to Puppeteer.
A --product option allows choice between 'firefox' and 'chrome'.
Puppeteer takes care of profile creation for Firefox. Additional Puppeteer
Launcher options can be passed along with --setopt.

Depends on D52313

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

--HG--
extra : moz-landing-system : lando
2019-11-08 11:58:08 +00:00
Maja Frydrychowicz ea7a28398b Bug 1590467 - Updated vendored puppeteer with proposed browser selection; r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D52313

--HG--
extra : moz-landing-system : lando
2019-11-08 11:52:18 +00:00
Ryan VanderMeulen 503d3a5358 Bug 1594871 - Disable the racy sub-test. r=whimboo
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
2019-11-07 16:14:25 -05:00
Henrik Skupin ce0143fbde Bug 1587846 - [remote] Add "quality" option to Page.captureScreenshot. r=remote-protocol-reviewers,ato,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D52146

--HG--
extra : moz-landing-system : lando
2019-11-07 19:02:00 +00:00
Henrik Skupin a2d30361e2 Bug 1587846 - [remote] Add "format" option to Page.captureScreenshot. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D52145

--HG--
extra : moz-landing-system : lando
2019-11-07 19:01:38 +00:00
Henrik Skupin 605cf70003 Bug 1587846 - [remote] Fix payload of return value for Page.captureScreenshot. r=remote-protocol-reviewers,ato
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
2019-11-07 19:01:25 +00:00
Henrik Skupin 976bcc1e77 Bug 1592643 - [remote] Implement Target.activateTarget. r=remote-protocol-reviewers,maja_zf,ato
Differential Revision: https://phabricator.services.mozilla.com/D52001

--HG--
extra : moz-landing-system : lando
2019-11-07 14:48:26 +00:00
Henrik Skupin e19b0aa009 Bug 1591922 - [remote] Page.bringToFront has to wait for activate and focus events. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D52000

--HG--
rename : remote/domains/parent/target/TabManager.jsm => remote/TabManager.jsm
extra : moz-landing-system : lando
2019-11-07 14:47:53 +00:00
Henrik Skupin 84cc2511ab Bug 1592643 - [remote] Methods in Target domain have to raise for invalid "targetId" argument. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D51999

--HG--
extra : moz-landing-system : lando
2019-11-07 14:46:58 +00:00
Henrik Skupin 15c37c5653 Bug 1592643 - [remote] Refactor and improve browser chrome tests for Target domain. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D51998

--HG--
rename : remote/test/browser/target/browser_target.js => remote/test/browser/target/browser_sendMessageToTarget.js
extra : moz-landing-system : lando
2019-11-07 14:46:42 +00:00
Andreas Tolfsen 452bd6cbca bug 1549708: remote: implement Page.reload's ignoreCache argument; r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D50805

--HG--
extra : moz-landing-system : lando
2019-11-06 15:32:55 +00:00
Thomas e1ff6f24a2 Bug 1591982 - Removed 'timestamp' property from Page.navigatedWithinDocument and Page.frameStoppedLoading r=whimboo,ato
Differential Revision: https://phabricator.services.mozilla.com/D51529

--HG--
extra : moz-landing-system : lando
2019-11-06 14:42:20 +00:00
Andreas Tolfsen ea1f27965e bug 1591927: remote: implement Security.setIgnoreCertificateErrors; r=remote-protocol-reviewers,maja_zf
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
2019-11-02 18:08:56 +00:00
Henrik Skupin f68309ef23 Bug 1591006 - [remote] Re-arrange browser-chrome tests by domains as subfolders. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D51019

--HG--
rename : remote/test/browser/browser_network_requestWillBeSent.js => remote/test/browser/network/browser_requestWillBeSent.js
rename : remote/test/browser/doc_network_requestWillBeSent.html => remote/test/browser/network/doc_requestWillBeSent.html
rename : remote/test/browser/file_network_requestWillBeSent.js => remote/test/browser/network/file_requestWillBeSent.js
rename : remote/test/browser/browser_page_bringToFront.js => remote/test/browser/page/browser_bringToFront.js
rename : remote/test/browser/browser_page_captureScreenshot.js => remote/test/browser/page/browser_captureScreenshot.js
rename : remote/test/browser/browser_page_frameNavigated.js => remote/test/browser/page/browser_frameNavigated.js
rename : remote/test/browser/browser_page_frameNavigated_iframe.js => remote/test/browser/page/browser_frameNavigated_iframe.js
rename : remote/test/browser/browser_page_javascriptDialog_alert.js => remote/test/browser/page/browser_javascriptDialog_alert.js
rename : remote/test/browser/browser_page_javascriptDialog_beforeunload.js => remote/test/browser/page/browser_javascriptDialog_beforeunload.js
rename : remote/test/browser/browser_page_javascriptDialog_confirm.js => remote/test/browser/page/browser_javascriptDialog_confirm.js
rename : remote/test/browser/browser_page_javascriptDialog_otherTarget.js => remote/test/browser/page/browser_javascriptDialog_otherTarget.js
rename : remote/test/browser/browser_page_javascriptDialog_prompt.js => remote/test/browser/page/browser_javascriptDialog_prompt.js
rename : remote/test/browser/browser_page_runtime_events.js => remote/test/browser/page/browser_runtimeEvents.js
rename : remote/test/browser/browser_runtime_callFunctionOn.js => remote/test/browser/runtime/browser_callFunctionOn.js
rename : remote/test/browser/browser_runtime_evaluate.js => remote/test/browser/runtime/browser_evaluate.js
rename : remote/test/browser/browser_runtime_executionContext.js => remote/test/browser/runtime/browser_executionContext.js
rename : remote/test/browser/browser_runtime_get_properties.js => remote/test/browser/runtime/browser_getProperties.js
rename : remote/test/browser/browser_runtime_remote_objects.js => remote/test/browser/runtime/browser_remoteObjects.js
rename : remote/test/browser/browser_target_browserContext.js => remote/test/browser/target/browser_browserContext.js
rename : remote/test/browser/browser_target_close.js => remote/test/browser/target/browser_closeTarget.js
rename : remote/test/browser/browser_target.js => remote/test/browser/target/browser_target.js
extra : moz-landing-system : lando
2019-10-30 13:25:56 +00:00
Maja Frydrychowicz dddda2631a Bug 1591216 - Minor corrections to Remote Agent documentation; r=remote-protocol-reviewers,ato
DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-10-28 10:16:54 +00:00
Maja Frydrychowicz 25b741df07 Bug 1591216 - Sync vendored puppeteer to v2.0.0; r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D50518

--HG--
rename : remote/test/puppeteer/.ci/node6/Dockerfile.linux => remote/test/puppeteer/.ci/node10/Dockerfile.linux
rename : remote/test/puppeteer/.ci/node6/Dockerfile.linux => remote/test/puppeteer/.ci/node12/Dockerfile.linux
extra : moz-landing-system : lando
2019-10-28 10:02:14 +00:00
Henrik Skupin d8abd5a355 Bug 1591341 - [remote] Always close the client connection in add_task() for browser chrome tests. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D50577

--HG--
extra : moz-landing-system : lando
2019-10-25 13:42:17 +00:00
Cosmin Sabou 96ad945519 Bug 1590930 - Temporarily skip remote/test/browser/browser_runtime_executionContext.js on windows. r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D50393

--HG--
extra : moz-landing-system : lando
2019-10-24 09:22:33 +00:00
Henrik Skupin e4aa62dc2c Bug 1589625 - [remote] Improve setup and teardown logic for browser chrome tests. r=remote-protocol-reviewers,ato
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
2019-10-23 15:50:04 +00:00
Henrik Skupin 68ec34ff0c Bug 1589625 - [remote] Start and stop the CDP server outside of the browser chrome tests. r=remote-protocol-reviewers,ato
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
2019-10-23 15:49:53 +00:00
Henrik Skupin 0f15d8260b Bug 1589625 - [remote] Improve handling of tabs when closing a chrome window. r=remote-protocol-reviewers,ato
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
2019-10-23 15:49:38 +00:00
Henrik Skupin ac5fe2028c Bug 1589625 - [remote] Add documentation for enabling logging of emitted events. r=remote-protocol-reviewers,ato,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D50230

--HG--
extra : moz-landing-system : lando
2019-10-23 15:49:19 +00:00
Maja Frydrychowicz 79206ae970 Bug 1587742 - Distinguish out-of-band non-CDP methods; r=remote-protocol-reviewers,ato,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D49989

--HG--
extra : moz-landing-system : lando
2019-10-22 13:46:58 +00:00
Maja Frydrychowicz dfb374293d Bug 1589844 - Move Input browser-chrome tests to their own directory; r=remote-protocol-reviewers,whimboo,ato
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
2019-10-22 13:09:49 +00:00
Maja Frydrychowicz af1d713760 Bug 1563206 - Call editor commands directly to emulate some native key bindings; r=ato,remote-protocol-reviewers
Depends on D47032

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

--HG--
extra : moz-landing-system : lando
2019-10-18 21:02:45 +00:00
Maja Frydrychowicz dd650b37c4 Bug 1563206 - Test top key combinations that affect gutenberg; r=ato,remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D47032

--HG--
extra : moz-landing-system : lando
2019-10-18 21:01:44 +00:00
Oana Pop Rus 3ad8f4bf4a Backed out changeset 1ce1b20dcc20 (bug 1563206) for mochitest remote perma failures in browser_input_dispatchKeyEvent.js on a CLOSED TREE 2019-10-18 18:55:01 +03:00
Maja Frydrychowicz 7b8844084a Bug 1563206 - Test top key combinations that affect gutenberg; r=ato,remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D47032

--HG--
extra : moz-landing-system : lando
2019-10-18 15:07:30 +00:00
shindli 99ded94f39 Merge autoland to mozilla-central. a=merge 2019-10-17 06:44:40 +03:00
Henrik Skupin 513521f536 Bug 1585272 - [remote] Register ChannelEventSinkFactory only once, and allow for multiple client connections. r=remote-protocol-reviewers,maja_zf
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
2019-10-16 20:23:05 +00:00
Henrik Skupin 3dce432d4f Bug 1563746 - [remote] Implement Page.captureScreenshot. r=remote-protocol-reviewers,maja_zf,ato
Differential Revision: https://phabricator.services.mozilla.com/D49203

--HG--
extra : moz-landing-system : lando
2019-10-16 19:36:56 +00:00
Andreas Tolfsen ae411df1a4 bug 1588727: remote: drop Users heading in docs; r=me a=doc
MANUAL PUSH: doc change
DONTBUILD
2019-10-15 11:05:31 +01:00
Henrik Skupin c8933daeb7 Bug 1586503 - Temporarily skip remote/test/browser/browser_runtime_executionContext.js on Mac. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D48906

--HG--
extra : moz-landing-system : lando
2019-10-10 23:38:51 +00:00
Henrik Skupin cef91826dc Bug 1585274 - [remote] Run Puppeteer unit tests in non-headless mode by default. r=remote-protocol-reviewers,maja_zf
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
2019-10-10 15:10:48 +00:00
Henrik Skupin 7a2422f61b Bug 1547961 - [remote] Unskip browser_runtime_executionContext.js on Mac and Windows. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D48161

--HG--
extra : moz-landing-system : lando
2019-10-04 09:35:48 +00:00
Andreas Tolfsen dada1b17df bug 1585630: remote: load frameNavigated test resources from Data URL; r=remote-protocol-reviewers,whimboo
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
2019-10-02 13:21:07 +00:00
Henrik Skupin d4dbaa0a19 Bug 1585464 - [remote] Unskip passing browser-chrome tests with Fission enabled. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D47896

--HG--
extra : moz-landing-system : lando
2019-10-02 12:51:06 +00:00
Anny Gakhokidze f1c694e18f Bug 1582531 - Update fission annotations for skipped tests that are now passing succesfully, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47347

--HG--
extra : moz-landing-system : lando
2019-09-27 14:25:10 +00:00
Anny Gakhokidze f4ff478a69 Bug 1582531 - Re-enable remote/test/browser/browser_session.js and remote/test/browser/browser_network_requestWillBeSent.js, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D46793

--HG--
extra : moz-landing-system : lando
2019-09-23 19:56:55 +00:00
Mihai Alexandru Michis 2d75ac3563 Backed out changeset 918818623794 (bug 1582230) as requested by kashav. a=backout 2019-09-19 21:41:17 +03:00
Kashav Madan f7b60d0193 Bug 1582230 - Remove remote/tests/browser fission annotations, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D46335

--HG--
extra : moz-landing-system : lando
2019-09-18 19:37:51 +00:00
Andreas Tolfsen 3852bf897f bug 1580470: remote: document security aspects of remote agent; r=remote-protocol-reviewers,maja_zf
This clarifies the security considerations we have made with the
remote agent.

The text is adapted from two sources:

	https://bugzilla.mozilla.org/show_bug.cgi?id=1542229
	https://docs.google.com/document/d/1LytMB7yueNLFehBp72Xzi_n4crncdHSHjQ3FCp0Meuo/edit#heading=h.k75yymb1qbxr

DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-09-12 11:39:13 +00:00
Andreas Tolfsen bc7f951fd6 bug 1540655: remote: document how to vendor Puppeteer; r=remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D39660

--HG--
extra : moz-landing-system : lando
2019-08-16 12:58:34 +00:00
Andreas Tolfsen eb6edbf0df bug 1540655: remote: document how to run Puppeteer tests; r=remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D39659

--HG--
extra : moz-landing-system : lando
2019-08-16 12:58:32 +00:00
Andreas Tolfsen d653e19e81 bug 1540655: remote: connect Puppeteer spec tests with mach test flavour; r=remote-protocol-reviewers,jdescottes
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
2019-08-16 12:58:23 +00:00
Andreas Tolfsen e95c2010c7 bug 1540655: remote: ignore non-vendored Node.js assets; r=remote-protocol-reviewers,jdescottes
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
2019-08-16 12:58:17 +00:00
Andreas Tolfsen a5a5c8b5bb bug 1540655: remote: add mach command for running Puppeteer tests; r=remote-protocol-reviewers,jdescottes
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
2019-08-16 12:58:15 +00:00
Andreas Tolfsen a0e6457fa6 bug 1540655: remote: vendor Puppeteer; r=remote-protocol-reviewers,jdescottes
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
2019-08-16 12:58:08 +00:00
Andreas Tolfsen 8350dc3134 bug 1540655: build, remote: add mach command for vendoring Puppeteer; r=firefox-build-system-reviewers,chmanchester
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
2019-08-16 12:58:06 +00:00
Andreas Tolfsen 0e1c8ecc27 bug 1569875: remote: fix link to Prefs.html; r=me a=doc
MANUAL PUSH: doc change
DONTBUILD
2019-08-14 14:43:01 +01:00
Nicholas Nethercote dd9bd0a9f7 Bug 1572622 - Merge remote.js into all.js. r=ato
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
2019-08-13 23:49:39 +00:00
Kris Maglione c01ad83372 Bug 1571502: Don't leak TabGroups which have never had windows joined to them. r=nika
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
2019-08-02 18:19:53 -07:00
Andreas Tolfsen 37c8f955e6 bug 1570378: remote: add bc test helper setup() for empty documents r=remote-protocol-reviewers,jdescottes
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
2019-08-05 11:43:58 +00:00
Andreas Tolfsen 53d0ddbba2 bug 1570378: remote: avoid URI terminology r=remote-protocol-reviewers,jdescottes
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
2019-08-05 11:43:51 +00:00
Narcis Beleuzu 33918de9e6 Backed out 2 changesets (bug 1570378) for ESlint failure on browser_page_javascriptDialog_ . CLOSED TREE
Backed out changeset 412894c27fa2 (bug 1570378)
Backed out changeset adb3dec1090b (bug 1570378)
2019-08-05 13:42:46 +03:00
Andreas Tolfsen e27f8cd92f bug 1570378: remote: add bc test helper setup() for empty documents r=remote-protocol-reviewers,jdescottes
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
2019-08-02 16:29:35 +00:00
Andreas Tolfsen c0923e6186 bug 1570378: remote: avoid URI terminology r=remote-protocol-reviewers,jdescottes
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
2019-08-02 16:28:42 +00:00
Andreas Tolfsen ebaff7b547 bug 1563533: remote: update bc tests to use document inlining; r=remote-protocol-reviewers,jdescottes
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
2019-07-31 12:52:21 +00:00
Andreas Tolfsen c4d142e772 bug 1563533: remote: add toDataURL document inlining helper; r=remote-protocol-reviewers,jdescottes
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
2019-08-02 16:26:01 +00:00
Julian Descottes e64c2ab141 Bug 1545724 - Add support for javascriptDialog APIs in Page domain r=remote-protocol-reviewers,whimboo,ochameau
Depends on D37168

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

--HG--
extra : moz-landing-system : lando
2019-08-01 12:25:57 +00:00
Andreas Tolfsen 705bbac14e bug 1570290: remote: fix duplicate implicit target in docs; r=me a=doc
Fixes lint warning.

MANUAL PUSH: doc change
DONTBUILD
2019-07-31 13:50:42 +01:00
Andreas Tolfsen 2fe8ddbb8c bug 1553756: remote: let Runtime.evaluate default to the current context; r=remote-protocol-reviewers,ochameau
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
2019-07-29 15:02:53 +00:00
Kris Maglione ef02b3cbd8 Bug 1568035: Part 1 - Skip tests which cause shutdown leaks under Fission. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D39459

--HG--
extra : rebase_source : 594e7c17a8aa81f9b212ff1fa492a8ab8f40d5ee
2019-07-19 15:31:16 -07:00
Andreas Tolfsen f7dd1ffde1 bug 1568865: remote: add missing license headers; r=remote-protocol-reviewers,jdescottes
Automatic output from running:

	% ./mach lint --fix remote/

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

--HG--
extra : moz-landing-system : lando
2019-07-25 15:41:12 +00:00
Andreea Pavel e4263c00eb Merge mozilla-inbound to mozilla-central. a=merge 2019-07-25 08:59:39 +03:00
Boris Zbarsky 9d613f2dd4 Bug 1568581. Stop mixing XULWindow and Window instances in TabObserver.jsm. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D39220

--HG--
extra : moz-landing-system : lando
2019-07-24 16:43:26 +00:00
Julian Descottes 2959ff7f5e Bug 1567436 - Support consecutive dispatchKeyEvents with the same type r=remote-protocol-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D38647

--HG--
extra : moz-landing-system : lando
2019-07-22 19:23:01 +00:00
Kris Maglione e40b418215 Bug 1566952: Part 2 - Update Fission failure annotations after skipping crashes. r=mccr8
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
2019-07-19 12:30:10 -07:00
Alexandre Poirot f0a9475719 Bug 1563690 - Make Target class save a list of Connection rather than Session. r=remote-protocol-reviewers,jdescottes
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
2019-07-18 16:39:11 +00:00
Alexandre Poirot 6deb23fefc Bug 1563689 - Release DOM event listeners set on top level windows. r=remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D38205

--HG--
extra : moz-landing-system : lando
2019-07-18 09:48:18 +00:00
Alexandre Poirot 3342beba03 Bug 1563689 - Ensure removing listeners set by TabObserver. r=remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D38201

--HG--
extra : moz-landing-system : lando
2019-07-16 16:30:10 +00:00
Alexandre Poirot 111854b5a5 Bug 1563689 - Revamp how targets are watched and reported. r=remote-protocol-reviewers,ato,jdescottes
* 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
2019-07-18 12:30:10 +00:00
Julian Descottes 7185b8d42a Bug 1562740 - Add test for race condition when using dispatchKeyEvent r=remote-protocol-reviewers,ato,ochameau
Depends on D37167

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

--HG--
extra : moz-landing-system : lando
2019-07-18 10:02:41 +00:00
Julian Descottes 2a6e2fcbe4 Bug 1562740 - Simplify dispatchKeyEvent test and stop waiting for content events in the test r=remote-protocol-reviewers,ochameau
Depends on D37166

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

--HG--
extra : moz-landing-system : lando
2019-07-12 08:30:43 +00:00
Julian Descottes 3958f91262 Bug 1562740 - Input:dispatchKeyEvent should wait for events in content process r=remote-protocol-reviewers,ochameau
Depends on D37165

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

--HG--
extra : moz-landing-system : lando
2019-07-12 08:30:30 +00:00
Julian Descottes 981f531b1f Bug 1562740 - Allow Domains managed by a TabSession to call executeInChild r=remote-protocol-reviewers,ochameau
Depends on D37046.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 08:30:03 +00:00
Kris Maglione 0962c2b731 Bug 1566182: Annotate mochitests that fail with Fission enabled. r=mccr8
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
2019-07-15 16:19:32 -07:00
Alexandre Poirot 3c8a0466f7 Bug 1544458 - Document the remote agent architecture. r=remote-protocol-reviewers,ato,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D36792

--HG--
extra : moz-landing-system : lando
2019-07-11 17:29:53 +00:00
Alexandre Poirot 370bc3f1f2 Bug 1563692 - Move all CDP's JSON packet handling to Connection. r=remote-protocol-reviewers,jdescottes,ato
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
2019-07-11 17:45:29 +00:00
Alexandre Poirot 2cb94420be Bug 1563687 - Rename Targets.disconnect to destructor to better match project's conventions. r=remote-protocol-reviewers,jdescottes,ato
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
2019-07-10 16:32:35 +00:00
Julian Descottes 337fec9e49 Bug 1564360 - Ignore iframes for Page.frameNavigated r=remote-protocol-reviewers,ochameau
WIP to illustrate a fix for this issue

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

--HG--
extra : moz-landing-system : lando
2019-07-10 04:57:35 +00:00
Alexandre Poirot 9c99764b14 Bug 1563685 - Rename WebSocketDebuggerTransport class to match its JSM file name. r=remote-protocol-reviewers,jdescottes,ato
Differential Revision: https://phabricator.services.mozilla.com/D37040

--HG--
extra : moz-landing-system : lando
2019-07-09 09:36:16 +00:00
Alexandre Poirot 6713234855 Bug 1563685 - Rename WebSocket.jsm and drop unused accept method. r=remote-protocol-reviewers,jdescottes,ato
Differential Revision: https://phabricator.services.mozilla.com/D37039

--HG--
rename : remote/server/WebSocket.jsm => remote/server/WebSocketHandshake.jsm
extra : moz-landing-system : lando
2019-07-09 09:36:14 +00:00
shindli 351e9a95ce Backed out 2 changesets (bug 1563685) for causing bc perma failures in browser/base/content/test/static/browser_all_files_referenced.js CLOSED TREE
Backed out changeset 10109cbe9641 (bug 1563685)
Backed out changeset 6525d810b0b0 (bug 1563685)

--HG--
rename : remote/server/WebSocketHandshake.jsm => remote/server/WebSocket.jsm
2019-07-08 22:25:34 +03:00
Alexandre Poirot a07eadfa52 Bug 1563685 - Rename WebSocketDebuggerTransport class to match its JSM file name. r=remote-protocol-reviewers,jdescottes,ato
Differential Revision: https://phabricator.services.mozilla.com/D37040

--HG--
extra : moz-landing-system : lando
2019-07-08 15:03:12 +00:00
Alexandre Poirot 22a355f138 Bug 1563685 - Rename WebSocket.jsm and drop unused accept method. r=remote-protocol-reviewers,jdescottes,ato
Differential Revision: https://phabricator.services.mozilla.com/D37039

--HG--
rename : remote/server/WebSocket.jsm => remote/server/WebSocketHandshake.jsm
extra : moz-landing-system : lando
2019-07-08 15:03:10 +00:00
Alexandre Poirot c64c4d7ee4 Bug 1563687 - Renamed ContentProcessSession.destroy to destructor in order to match this project's conventions. r=remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D37041

--HG--
extra : moz-landing-system : lando
2019-07-08 15:07:09 +00:00
Sebastian Hengst da66a3d83c Bug 1563621 - Fix browser_main_target.js product assertion when running in headless mode: take new Prettier style into account. a=eslint-fix CLOSED TREE 2019-07-05 21:18:51 +02:00
Julian Descottes b8813ed35c Bug 1563621 - Fix browser_main_target.js product assertion when running in headless mode r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D37005

--HG--
extra : moz-landing-system : lando
2019-07-05 07:01:19 +00:00
Victor Porof 77c95c13f4 Bug 1561435 - Fix linting errors for remote/, r=standard8
# ignore-this-changeset

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

--HG--
extra : source : ae886697ab13ffcff18917578627c537cdca2b6e
extra : intermediate-source : 80795ef6e0c395f9cea18a4a9f813409f6844494
2019-06-21 15:57:42 -07:00
Victor Porof 991b3c93c6 Bug 1561435 - Format remote/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : b793788d0f38244b33eb59ea36e2c6624dbd12c5
2019-07-05 10:56:48 +02:00
Alexandre Poirot 6e45d0129a Bug 1560301 - Implement very minimal support of browser context. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D35427

--HG--
extra : moz-landing-system : lando
2019-07-02 12:40:58 +00:00
Alexandre Poirot a3a3535d2d Bug 1543185 - Implement Input.dispatchMouseEvent. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D27500

--HG--
extra : moz-landing-system : lando
2019-07-01 08:34:04 +00:00
Julian Descottes 5cbe9516b1 Bug 1562205 - Enable selectionchange on inputs for test browser_input_dispatchKeyEvent.js
The test was relying on selectionchange events fired on an input text element.
This event is behind a pref, flip the pref to true during the test in order to make it
pass on all channels

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

--HG--
extra : moz-landing-system : lando
2019-06-30 15:17:38 +00:00
Alexandre Poirot 7c4f974fe1 Bug 1552325 - Implement Network.requestWillBeSent. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D36008

--HG--
extra : moz-landing-system : lando
2019-06-28 08:16:46 +00:00
Andrey Lushnikov 49180a060f Bug 1552325 - Land juggler's network observer. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D36007

--HG--
extra : moz-landing-system : lando
2019-06-28 08:16:45 +00:00
Julian Descottes cebb0662f3 Bug 1543142 - Wait for explicit events in dispatchKeyEvent test r=ochameau
Depends on D36047

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

--HG--
extra : moz-landing-system : lando
2019-06-27 15:09:13 +00:00
Julian Descottes 6e7fb9f53a Bug 1543142 - Add basic test for dispatchKeyEvent r=remote-protocol-reviewers,ochameau
Depends on D36044

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

--HG--
extra : moz-landing-system : lando
2019-06-27 12:10:45 +00:00
Julian Descottes 21c37aac79 Bug 1543142 - Implement basic dispatchKeyEvent in parent Input domain r=ato
Differential Revision: https://phabricator.services.mozilla.com/D36044

--HG--
extra : moz-landing-system : lando
2019-06-27 14:47:18 +00:00
Alexandre Poirot cf99fa36d0 Bug 1536862 - Register RemoteAgent JS XPCOM by using new registration method. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D24228

--HG--
extra : moz-landing-system : lando
2019-06-26 20:25:43 +00:00
Alexandre Poirot 8a4336ab05 Bug 1545726 - Implement DOM.getBoxModel. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30203

--HG--
extra : moz-landing-system : lando
2019-06-25 19:34:05 +00:00
Alexandre Poirot c96f5c4244 Bug 1543151 - Implement DOM.getContentQuads. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D27519

--HG--
extra : moz-landing-system : lando
2019-06-25 19:34:05 +00:00
shindli 7eb69b5a5b Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-06-21 19:18:24 +03:00
shindli b14c971dcf Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-06-21 12:42:48 +03:00
Andreas Tolfsen 5d23d12091 bug 1560497: remote: use public Slack instance URL; r=me a=doc
There’s a new signup page for the Slack instance at
https://devtools-html-slack.herokuapp.com/ which accepts non-MoCo
email addresses. We should use this in our public documentation so
contributors can sign in.

DONTBUILD
2019-06-21 10:20:03 +01:00
Alexandre Poirot d736224061 Bug 1560280 - Return a real userAgent string in Browser.getVersion. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D35417

--HG--
extra : moz-landing-system : lando
2019-06-21 09:15:00 +00:00
Alexandre Poirot c4a5d97834 Bug 1560281 - Emit Target.targetCreated for the main process target. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D35420

--HG--
extra : moz-landing-system : lando
2019-06-20 13:51:53 +00:00
Alexandre Poirot 8c54f21269 Bug 1560281 - Set main process target's "type" attribute to "browser". r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D35419

--HG--
extra : moz-landing-system : lando
2019-06-20 14:14:20 +00:00
Alexandre Poirot 441a04f86b Bug 1560294 - Relax frameId check in Page.navigate. r=remote-protocol-reviewers,ato
This assertion was mostly meant to warn about this being unimplemented when you were trying to target an iframe.
If frameId refers to the top level tab document, that is fine. This method will work as expected.

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

--HG--
extra : moz-landing-system : lando
2019-06-20 14:17:18 +00:00
Alexandre Poirot d99b8ff7b6 Bug 1549782 - Implement Runtime.getProperties. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30232

--HG--
extra : moz-landing-system : lando
2019-06-19 14:46:14 +00:00
Julian Descottes 8e2c4566f1 Bug 1543071 - Test remote Target.closeTarget and targetDestroyed event r=ochameau
Depends on D35107

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

--HG--
extra : moz-landing-system : lando
2019-06-19 00:15:34 +00:00
Alexandre Poirot d61e8d213e Bug 1543071 - Implement Target.closeTarget r=ato
Depends on D35106

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

--HG--
extra : moz-landing-system : lando
2019-06-19 12:23:16 +00:00
Alexandre Poirot becc6da52a Bug 1543071 - Implement Target.targetDestroyed event r=ato
Differential Revision: https://phabricator.services.mozilla.com/D35106

--HG--
extra : moz-landing-system : lando
2019-06-19 12:22:34 +00:00
Alexandre Poirot cbc84bd6f9 Bug 1553103 - Document the node test script using chrome-remote-inteface. r=jdescottes
Also fix the script against firefox. It only used to run against chromium.

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

--HG--
extra : moz-landing-system : lando
2019-06-18 22:05:56 +00:00
Alexandre Poirot d73b8a9739 Bug 1545147 - Run remote agent's mochitests in a distinct "remote" job. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D32028

--HG--
extra : moz-landing-system : lando
2019-06-17 13:57:03 +00:00
Alexandre Poirot 837877e5c2 Bug 1560278 - Prepend "Headless" in Browser.getVersion's product field when firefox runs headless. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D35416

--HG--
extra : moz-landing-system : lando
2019-06-20 14:36:19 +00:00
Ehsan Akhgari b3c4267b3c Bug 1557887 - Part 6: Pass a storage principal to the rest of the call sites for createAboutBlankContentViewer(); r=baku
Differential Revision: https://phabricator.services.mozilla.com/D34460

--HG--
extra : moz-landing-system : lando
2019-06-12 09:07:33 +00:00
Gurzau Raul d568f187db Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-05-28 00:57:10 +03:00
Andreas Tolfsen de8c9e85cf bug 1553317: remote: improve error message on missing method; r=remote-protocol-reviewers,ochameau CLOSED TREE
We return with this rather omnious message when we are missing the
implementation of a CDP method:

	Error: Protocol error (Target.createBrowserContext): TypeError: inst[command] is not a function:

This patch improves the error message so that debugging is not
necessary to find out which domain or command is missing.

Ideally Session.jsm and ContentProcessSession.jsm would share the
same execute() function (there's really not reason they don't),
but that involves more work.

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

--HG--
extra : source : f3d44dbce7e3d1b529ce37b21a4d7471a918edd4
extra : histedit_source : df4d534565efb3e2babbc277a3aecce5d534ac39
2019-05-27 11:39:16 +00:00
Andreas Tolfsen 40f04269b2 bug 1554638: remote: fix link to Slack instance; r=me a=doc
DONTBUILD
2019-05-27 12:23:26 +01:00
Julian Descottes a1552ab73e Bug 1554374 - ContentProcess domains should call super.destructor r=ato
This should avoid the test failures in debug.

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

--HG--
extra : moz-landing-system : lando
2019-05-25 17:36:37 +00:00
Brindusan Cristian 1f36d9b150 Backed out changeset f3d44dbce7e3 (bug 1553317) for bc failures at browser_parsable_css.js. CLOSED TREE 2019-05-27 17:51:56 +03:00
Andreas Tolfsen 26201b29a2 bug 1553317: remote: improve error message on missing method; r=remote-protocol-reviewers,ochameau
We return with this rather omnious message when we are missing the
implementation of a CDP method:

	Error: Protocol error (Target.createBrowserContext): TypeError: inst[command] is not a function:

This patch improves the error message so that debugging is not
necessary to find out which domain or command is missing.

Ideally Session.jsm and ContentProcessSession.jsm would share the
same execute() function (there's really not reason they don't),
but that involves more work.

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

--HG--
extra : moz-landing-system : lando
2019-05-27 11:39:16 +00:00
Julian Descottes 12d5dff1f5 Bug 1535102 - Extract shared helper to setup remote CDP mochitests r=ato
Depends on D32538.
Not mandatory, but we have some duplicated code shared by several mochitests, maybe we could have a shared helper?

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

--HG--
extra : moz-landing-system : lando
2019-05-27 08:04:11 +00:00
Julian Descottes 2456aa785c Bug 1535102 - Implement Page.bringToFront and introduce parent Page domain r=ato
Differential Revision: https://phabricator.services.mozilla.com/D32538

--HG--
extra : moz-landing-system : lando
2019-05-27 08:52:03 +00:00
shindli bdf94edb89 Merge inbound to mozilla-central. a=merge 2019-05-22 18:26:18 +03:00
Noemi Erli 98ff24cc58 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-05-22 06:45:38 +03:00
Julian Descottes 0efd6acf34 Bug 1549786 - Add test for Page.navigate reloads the page with the same URL r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D32027

--HG--
extra : moz-landing-system : lando
2019-05-22 08:58:08 +00:00
Alexandre Poirot 42edb859a2 Bug 1553102 - Disable content blocking when running the remote agent. r=remote-protocol-reviewers,ato
The tests currently running against chromium do not expect the content blocking
to be enabled. So, to prevent breaking cookies/requests being done by the tests,
disable it by default when running the agent.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 12:22:33 +00:00
Alexandre Poirot 99fcb39d5d Bug 1553102 - Disable safe mode when running the remote agent. r=remote-protocol-reviewers,ato
The node program (puppeteer) and/or the agent itself, will close Firefox brutaly
in some cases. So that when we reopen Firefox, the safe mode popup will be shown,
asking the user if he prefers to start in safe mode.
But that break the automation as we expect Firefox to be opening the browser window as usual.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 12:22:31 +00:00
Alexandre Poirot 23a00baa72 Bug 1549785 - Fix Remote object support for Node/Elements objects. r=remote-protocol-reviewers,ato
Debugger.Object's class isn't "Object" for DOM Elements.
Instead, it is specific to each element tag name.

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

--HG--
extra : moz-landing-system : lando
2019-05-14 20:05:32 +00:00
Alexandre Poirot 768c21fdb9 Bug 1549785 - Implement Runtime.releaseObject. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30231

--HG--
extra : moz-landing-system : lando
2019-05-14 21:59:50 +00:00
Alexandre Poirot 6908d17662 Bug 1551689 - Print listener address with a new-line. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D31127

--HG--
extra : moz-landing-system : lando
2019-05-14 22:00:11 +00:00
Alexandre Poirot 2797f9402a Bug 1548102 - Coordinate Page.frameNavigated and Runtime.executionContextDestroyed/Created events. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30237

--HG--
extra : moz-landing-system : lando
2019-05-14 15:18:51 +00:00
Alexandre Poirot a26a2fc84b Bug 1549384 - Implement Page.getFrameTree. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30207

--HG--
extra : moz-landing-system : lando
2019-05-14 09:07:36 +00:00
Alexandre Poirot d3544d3efb Bug 1548098 - Implement Runtime.callFunctionOn's objectId argument. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30267

--HG--
extra : moz-landing-system : lando
2019-05-13 16:11:49 +00:00
Alexandre Poirot 91d75827c5 Bug 1548098 - Implement Runtime.callFunctionOn's awaitPromise argument. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30266

--HG--
extra : moz-landing-system : lando
2019-05-13 16:10:30 +00:00
Alexandre Poirot 839bd8dbb2 Bug 1548098 - Implement Runtime.callFunctionOn's returnByValue argument. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30265

--HG--
extra : moz-landing-system : lando
2019-05-13 16:10:22 +00:00
Alexandre Poirot ae4c521034 Bug 1548098 - Implement Runtime.callFunctionOn. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30264

--HG--
extra : moz-landing-system : lando
2019-05-13 16:10:20 +00:00
Alexandre Poirot b355e57a31 Bug 1548098 - Pull out exception handling into a dedicated _returnError method. r=remote-protocol-reviewers,ato
This will be used in the next changeset.

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

--HG--
extra : moz-landing-system : lando
2019-05-13 16:10:43 +00:00
Andreas Tolfsen 5485cb24b1 bug 1551188: remote: print listening address similarly to chrome; r=remote-protocol-reviewers,ochameau
Puppeteer parses stderr looking for the regular expression
^DevTools listening on (ws:\/\/.*)$.  For Puppeteer to be able
to connect to Firefox, we need to change the line we print slightly
to conform with this expression.

The remote agent also uses Log.jsm to print it, but we cannot rely
on logging always being enabled, e.g. if remote.log.level is set
to Warn or above.  For this reason we should use dump().

The patch also instantiates the main target before starting the HTTPD.

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

--HG--
extra : moz-landing-system : lando
2019-05-13 14:43:21 +00:00
Alexandre Poirot 25a90f109b Bug 1544445 - Implement Page.reload. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D30189

--HG--
extra : moz-landing-system : lando
2019-05-07 12:52:49 +00:00
Alexandre Poirot 6141376ca9 Bug 1537768 - Override add_task to translate cdp exception from head.js. r=remote-protocol-reviewers,ato
This allows improving all tests exceptions without requiring
any specific to be done in each tests.
I'm also moving a few imports to head.js to share the most into head.js.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 12:00:39 +00:00
Alexandre Poirot b45bb32493 Bug 1537768 - Simplify RemoteAgent initialization. r=remote-protocol-reviewers,ato
Start the `TabObserver` from `RemoteAgent.listen` in order to prevent
having the tests to manually start it.
Start it from `listen` instead of `init` as we do stop the `TabObserver` from
`stop` and `stop` is the reverse of `listen`, not the reverse of `init`.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 12:00:37 +00:00
Alexandre Poirot fcb2aa8735 Bug 1543099 - Implement Runtime.evaluate. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D27525

--HG--
extra : moz-landing-system : lando
2019-05-02 11:55:55 +00:00
Alexandre Poirot 2731109ae0 Bug 1543099 - Split browser_runtime_executionContext into multiple functions r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D29385

--HG--
extra : moz-landing-system : lando
2019-05-02 10:11:40 +00:00
Alexandre Poirot 4acc49f558 Bug 1543098 - Emit executionContextDestroyed and executionContextCreated when the page goes into/out of the BF Cache. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D28959

--HG--
extra : moz-landing-system : lando
2019-05-02 10:22:13 +00:00
Alexandre Poirot 292f73b2d1 Bug 1543098 - Implement Runtime.executionContextDestroyed. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D27524

--HG--
extra : moz-landing-system : lando
2019-05-02 10:22:06 +00:00
Alexandre Poirot 2e7bacc0d1 Bug 1543098 - Emit executionContextCreated for existing context when calling Runtime.enable. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D28958

--HG--
extra : moz-landing-system : lando
2019-05-02 10:22:04 +00:00
Alexandre Poirot 308a953c12 Bug 1543098 - Implement Runtime.executionContextCreated. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D27523

--HG--
extra : moz-landing-system : lando
2019-05-02 10:21:56 +00:00
Ciure Andrei b63cc4d20a Backed out 4 changesets (bug 1543098) for high frequency browser_runtime_executionContext.js failures CLOSED TREE
Backed out changeset a414e99fbbc8 (bug 1543098)
Backed out changeset f5645934c8ec (bug 1543098)
Backed out changeset 142fc2db9173 (bug 1543098)
Backed out changeset 0a13ac4fa9d7 (bug 1543098)
2019-05-01 14:53:50 +03:00
Alexandre Poirot b17e090d38 Bug 1543098 - Emit executionContextDestroyed and executionContextCreated when the page goes into/out of the BF Cache. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D28959

--HG--
extra : moz-landing-system : lando
2019-04-29 14:59:07 +00:00
Alexandre Poirot 518602fb41 Bug 1543098 - Implement Runtime.executionContextDestroyed. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D27524

--HG--
extra : moz-landing-system : lando
2019-04-29 14:58:59 +00:00
Alexandre Poirot d19d0f5a17 Bug 1543098 - Emit executionContextCreated for existing context when calling Runtime.enable. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D28958

--HG--
extra : moz-landing-system : lando
2019-04-29 14:58:57 +00:00
Alexandre Poirot f0c55a6dc9 Bug 1543098 - Implement Runtime.executionContextCreated. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D27523

--HG--
extra : moz-landing-system : lando
2019-04-29 14:58:55 +00:00
Alexandre Poirot ff0fe13c9f Bug 1543095 - Pass `frameId` to all Page events. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D28957

--HG--
extra : moz-landing-system : lando
2019-04-29 13:42:55 +00:00
Alexandre Poirot 5a549b8d58 Bug 1543095 - Implement Page.frameNavigated. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D27522

--HG--
extra : moz-landing-system : lando
2019-04-30 11:09:30 +00:00
Andreas Tolfsen 19ce910c3c bug 1547679: remote: disable browser-chrome tests on asan; r=remote-protocol-reviewers,ochameau
We should also disable browser-chrome tests on ASan, as some of
the leaks reported were caught by LeakSanitizer, which is run as
part of AddressSanitizer.

Follow-up from https://bugzilla.mozilla.org/show_bug.cgi?id=1547679#c3.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 10:00:35 +00:00
Cosmin Sabou cefec2692f Merge mozilla-inbound to mozilla-central. a=merge 2019-04-29 19:02:11 +03:00
Andreas Tolfsen 16d0b89fc7 bug 1547700: remote: document headless mode for M-bc tests; r=me a=doc
DONTBUILD
2019-04-29 14:24:33 +01:00
Andreas Tolfsen 254c289d96 bug 1547700: remote: simplify mochitest command; r=me a=doc
DONTBUILD
2019-04-29 14:24:08 +01:00
Andreas Tolfsen a73b899266 bug 1547679: remote: disable all browser-chrome tests on debug; r=remote-protocol-reviewers,ochameau
Before landing the remote agent in Firefox Nightly, we had to disable
remote/test/browser/browser_cdp.js because it caused a permafailure
on debug due to a memory leak.  We thought the problem was limited
to this specific test, but over the weekend two more intermittent
leaks were discovered:

  * https://bugzilla.mozilla.org/show_bug.cgi?id=1546850
  * https://bugzilla.mozilla.org/show_bug.cgi?id=1547303

Until we have had time to investigate and plug the leak, we will
disable all the browser-chrome tests on all debug platforms.

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

--HG--
extra : moz-landing-system : lando
2019-04-29 12:50:15 +00:00
Andreas Tolfsen 09e148f159 bug 1546945: remote: disable browser_cdp.js browser-chrome test on debug; r=ochameau
As detailed in https://bugzilla.mozilla.org/show_bug.cgi?id=1546945,
there is a memory leak in the remote agent that is triggered by
code paths in the remote/test/browser/browser_cdp.js browser-chrome test.

It is possible the memory leak is related to holding onto a reference
of the XPConnect C++ object nsSocketTransportService, but this has
yet to be confirmed.

This patch disables the test in question on debug builds, where
we run reference counting leakchecks, in order to get the remote
agent enabled in default Firefox Nightly builds.

Thanks-to: Alexandre Poirot <poirot.alex@gmail.com>

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

--HG--
extra : moz-landing-system : lando
2019-04-25 18:27:05 +00:00
Gurzau Raul 71e35400ef Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-04-25 19:30:38 +03:00
Andreas Tolfsen 3c8ae0e869 bug 1546722: remote: print better errors in browser chrome tests; r=yulia
We can reconstruct the CDP error and print a better error message
using RemoteAgentError.  This is better than the current output,
which in a lot of cases will be "CDP Exception: [object Object]".

A possible future improvement to this involves extending the CDP
protocol to send the individual components of the error individually,
so that we don't have to parse the string.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 15:16:46 +00:00
Andreas Tolfsen 8ccafe6392 bug 1546714: remote: fix bug component mapping for remote/targets/; r=ochameau
There are two concepts of targets in CDP: the target web document,
and the Target domain.  The remote/targets/ subfolder is related
to the first, which should have bugs filed under Remote Protocol ::
Agent, covered by the preceding rule.

DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-04-25 13:49:57 +00:00
Andreas Tolfsen d3121dd02c bug 1546714: remote: map Remote Protocol :: {DOM, Input} bug components; r=ochameau
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
2019-04-25 14:27:15 +00:00
Andreas Tolfsen 9d9634b875 bug 1546935: remote: reflect that remote agent is disabled in usage docs; r=me a=doc
DONTBUILD
2019-04-25 12:01:12 +01:00
Andreas Tolfsen 0ec47f620a bug 1546933: remote: clarify that tests are run on try; r=me a=doc
DONTBUILD
2019-04-25 11:52:53 +01:00
Andreas Tolfsen 86da122b28 bug 1546933: remote: drop unnecessary flags for ./mach test; r=me a=doc
The tests are instrumented to automatically set the remote.enabled
preference as part of their manifests. In the case of xpcshell,
it is also technically not need it as they do not trigger the
command-line-handler.js code path.

DONTBUILD
2019-04-25 11:52:52 +01:00
Bogdan Tara 7b9699da3b Backed out 2 changesets (bug 1546714) for test_mozbuild_reading.py bustages CLOSED TREE
Backed out changeset 02a67f69acd2 (bug 1546714)
Backed out changeset c29a7a2c36d6 (bug 1546714)
2019-04-25 14:15:22 +03:00
Andreas Tolfsen b5e28c3210 bug 1546714: remote: fix bug component mapping for remote/targets/; r=ochameau
There are two concepts of targets in CDP: the target web document,
and the Target domain.  The remote/targets/ subfolder is related
to the first, which should have bugs filed under Remote Protocol ::
Agent, covered by the preceding rule.

DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-04-25 10:33:01 +00:00
Andreas Tolfsen e40c27877d bug 1546714: remote: map Remote Protocol :: {DOM, Input} bug components; r=ochameau
DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:38 +00:00
Andreas Tolfsen 5107d02ac8 bug 1533831: remote: remove test_FatalError; r=ochameau
FatalError uses Services.startup.quit and this is apparently fine
to run in an xpcshell test with an optimised build, but not with
debug builds where it causes MOZ_CRASH() to be hit.

This removes test_FatalError so that we can run test_Error.js on try.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:28:14 +00:00
Andreas Tolfsen 942eecb096 bug 1533831: remote: run bc tests as part of regular batch; r=ochameau
The remote debugger mochitest browser-chrome tests do not have to
be run in a separate subsuite.  Removing the subsuite condition
will make them appear as part of the normal M-bc* jobs on try.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:18:14 +00:00
Andreas Tolfsen b3dc3fc611 bug 1533831: remote: include remote agent in default build; r=firefox-build-system-reviewers,chmanchester
The previous commit disabled the remote agent by flipping the
remote.enabled preference to false.  That prevented the remote
agent from initialising or being included in the --help message.

This patch implies --enable-cdp in the default Firefox build on Firefox
Nightly.  Firefox for Android is not supported.  This will cause
builds to include the remote agent component that lives under remote/.

Since the remote agent is disabled by default, users will first
have to set the remote.enabled preference to true in order to use it.

If you wish to explicitly opt out of including the remote agent
when building Firefox, you may do so by using the --disable-cdp
build flag in your mozconfig:

	ac_add_options --disable-cdp

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:18:22 +00:00
Andreas Tolfsen a3273a8312 bug 1533831: remote: disable remote agent; r=ochameau
This disables the remote agent through flipping the remote.enabled
preference to false.  This will cause the help text to disappear from
--help and the RemoteAgent#init() (in remote/RemoteAgent.jsm) to fail.

We also change RemoteAgent.jsm to being loaded lazily so that it
isn't imported.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:18:37 +00:00
Andreas Tolfsen 6625f0d1e9 bug 1533831: remote: remove browser.fission.simulate pref; r=ochameau,yulia
The browser.fission.simulate preference has been split
into two preferences: fission.frontend.simulate-events and
fission.frontend.simulate-messages.

The remote agent briefly used the child actor system from the
Firefox frontend code when we prototyped the initial remote agent,
but it no longer relies on it.  This means we can drop the reference
to browser.fission.simulate altogether.

DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:18:44 +00:00
Cosmin Sabou 6e8934bb87 Backed out 4 changesets (bug 1533831) for xpcshell failures on remote/test/unit/test_Error.js. CLOSED TREE
Backed out changeset a3014b38cc5f (bug 1533831)
Backed out changeset 57a319eeed2d (bug 1533831)
Backed out changeset afcfdae88bf7 (bug 1533831)
Backed out changeset c03450df8660 (bug 1533831)
2019-04-24 19:55:51 +03:00
Andreas Tolfsen 28ce4058ed bug 1533831: remote: run bc tests as part of regular batch; r=ochameau
The remote debugger mochitest browser-chrome tests do not have to
be run in a separate subsuite.  Removing the subsuite condition
will make them appear as part of the normal M-bc* jobs on try.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 15:18:28 +00:00
Andreas Tolfsen 9eab4824cb bug 1533831: remote: include remote agent in default build; r=firefox-build-system-reviewers,chmanchester
The previous commit disabled the remote agent by flipping the
remote.enabled preference to false.  That prevented the remote
agent from initialising or being included in the --help message.

This patch implies --enable-cdp in the default Firefox build on Firefox
Nightly.  Firefox for Android is not supported.  This will cause
builds to include the remote agent component that lives under remote/.

Since the remote agent is disabled by default, users will first
have to set the remote.enabled preference to true in order to use it.

If you wish to explicitly opt out of including the remote agent
when building Firefox, you may do so by using the --disable-cdp
build flag in your mozconfig:

	ac_add_options --disable-cdp

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

--HG--
extra : moz-landing-system : lando
2019-04-24 15:18:09 +00:00
Andreas Tolfsen e3303b3d92 bug 1533831: remote: disable remote agent; r=ochameau
This disables the remote agent through flipping the remote.enabled
preference to false.  This will cause the help text to disappear from
--help and the RemoteAgent#init() (in remote/RemoteAgent.jsm) to fail.

We also change RemoteAgent.jsm to being loaded lazily so that it
isn't imported.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 15:18:02 +00:00
Andreas Tolfsen 5d69ffdef8 bug 1533831: remote: remove browser.fission.simulate pref; r=ochameau,yulia
The browser.fission.simulate preference has been split
into two preferences: fission.frontend.simulate-events and
fission.frontend.simulate-messages.

The remote agent briefly used the child actor system from the
Firefox frontend code when we prototyped the initial remote agent,
but it no longer relies on it.  This means we can drop the reference
to browser.fission.simulate altogether.

DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-04-24 15:17:50 +00:00
Andreas Tolfsen 888b647600 bug 1546385: remote: listen for target to connect sooner; r=ochameau
TabManager.addTab(), and consequently gBrowser.addTab(), causes
tabs to open before Target#createTarget() gets time to install an
listener for a new target.

Since targets are created on the TabOpen event, we must install the
listener before we open the tab.  This has the consequence that we
cannot reliably tell where the first target that connects comes from.
For this reason, this makes a functional change to return an error
if such an eventuality should arise.

This patch fixes the failing remote/test/browser/browser_target.js
browser-chrome test.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 07:45:19 +00:00
Gurzau Raul 9b30abf7c9 Backed out 4 changesets (bug 1533831) for failing at /browser/browser_target.js on a CLOSED TREE.
Backed out changeset 94fd0790781a (bug 1533831)
Backed out changeset d32384388e3d (bug 1533831)
Backed out changeset bd363475667f (bug 1533831)
Backed out changeset b818d6ca606d (bug 1533831)
2019-04-18 05:35:54 +03:00
Andreas Tolfsen 77f0eda9ee bug 1533831: remote: run bc tests as part of regular batch; r=ochameau
The remote debugger mochitest browser-chrome tests do not have to
be run in a separate subsuite.  Removing the subsuite condition
will make them appear as part of the normal M-bc* jobs on try.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 17:46:04 +00:00