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

471 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen 9444fa34c7 bug 1606818: remote: use nsIHttpServer for unregistering handler r=remote-protocol-reviewers,whimboo
nsIHttpServer.registerPathHandler() is designed to take null as
the second argument to unregister path handlers.  This saves us
from having to modify its internal state, and fixes a minor TODO
in the remote agent initialisation code.

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

--HG--
extra : moz-landing-system : lando
2020-01-03 16:19:33 +00:00
Andreas Tolfsen 4ff0799afe bug 1565164: remote: rename Domains DomainCache r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D58610

--HG--
rename : remote/domains/Domains.jsm => remote/domains/DomainCache.jsm
rename : remote/test/unit/test_Domains.js => remote/test/unit/test_DomainCache.js
extra : moz-landing-system : lando
2020-01-06 09:32:11 +00:00
Andreas Tolfsen 112d47f40c bug 1565164: remote: rename Targets TargetList r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D58609

--HG--
rename : remote/targets/Targets.jsm => remote/targets/TargetList.jsm
extra : moz-landing-system : lando
2020-01-06 09:32:09 +00:00
Andreas Tolfsen 1b5c764457 bug 1606834: remote: document fdescribe(), fit(), and Mocha flags r=remote-protocol-reviewers,whimboo
We were lacking documentation on how to run inidividual Puppeteer
tests.  It turns out this is not possible yet to do on a per-file
basis, like other test harnesses.

Instead, suggest use of fdescribe()/fit() and recommend some useful
Mocha flags.

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

--HG--
extra : moz-landing-system : lando
2020-01-03 16:11:19 +00:00
Andreas Tolfsen d9f8d5f71e bug 1606317: remote: revert "Disable Puppeteer tests in ignorehttpserrors.spec.js which crash the browser." r=remote-protocol-reviewers,whimboo
This reverts the commit:

	git:	d640ab64b993431099cd9205297bfff464d76927
	hg:	9f6327c0d8298ec58a6c9f8d51526872d01d765e

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

--HG--
extra : moz-landing-system : lando
2020-01-03 13:44:39 +00:00
Coroiu Cristina 9513ceda80 Backed out 3 changesets (bug 1606317) for build bustage at build/src/security/manager/ssl/nsCertOverrideService.cpp on a CLOSED TREE
Backed out changeset 9c34a0a40e62 (bug 1606317)
Backed out changeset 467db2b310a7 (bug 1606317)
Backed out changeset b12669c3ade7 (bug 1606317)
2020-01-03 15:11:29 +02:00
Andreas Tolfsen 27106918c7 bug 1606317: remote: revert "Disable Puppeteer tests in ignorehttpserrors.spec.js which crash the browser." r=remote-protocol-reviewers,whimboo
This reverts the commit:

	git:	d640ab64b993431099cd9205297bfff464d76927
	hg:	9f6327c0d8298ec58a6c9f8d51526872d01d765e

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

--HG--
extra : moz-landing-system : lando
2020-01-03 10:16:13 +00:00
Henrik Skupin db8cf153cd Bug 1593979 - [remote] Always include global head.js and chrome-remote-interface.js. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D54568

--HG--
extra : moz-landing-system : lando
2020-01-03 09:02:15 +00:00
Henrik Skupin b35d14d120 Bug 1605722 - [remote] Enable target discovery by default for browser chrome tests. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D58162

--HG--
extra : moz-landing-system : lando
2020-01-02 21:13:20 +00:00
Brindusan Cristian 87aed6f2be Backed out 2 changesets (bug 1606612) for 'remote' failures at browser_scriptToEvaluateOnNewDocument.js. CLOSED TREE
Backed out changeset d0ff02a17ad9 (bug 1606612)
Backed out changeset 4368466b495b (bug 1606612)
2020-01-02 18:19:40 +02:00
Andreas Tolfsen 986fa21674 bug 1606613: remote: stop logging handled errors r=remote-protocol-reviewers,whimboo
Errors that arise from use of the protocol, for example by the client
passing in the wrong argument or an operationg being unsupported, are
returned to the client.  Since these are not inherent implementation
problems there is no point to double-logging them in the server.

This is a left-over from when the remote agent was in a prototype
stage and we couldn't always rely on the Puppeteer client to
interact with Firefox correctly.

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

--HG--
extra : moz-landing-system : lando
2020-01-02 12:02:17 +00:00
Andreas Tolfsen d482c88ae3 bug 1606612: remote: pretty-print WebSocket JSON payloads when verbose logging r=remote-protocol-reviewers,whimboo
When remote.log.level is Log.Level.Info or above, verbose logging
is enabled and we pretty-print JSON payloads in requests to the
HTTPD in JSONHandler.

This patch matches the behaviour with JSON payloads being transmitted
across WebSocket connections.

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

--HG--
extra : moz-landing-system : lando
2020-01-02 13:08:54 +00:00
Andreas Tolfsen 4f915f8ab5 bug 1606612: remote: move payload sanitization to Protocol r=remote-protocol-reviewers,whimboo
Moving the JSON payload sanitisation function to Protocol.jsm
means we can share it across modules.

The patch also adds new tests.

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

--HG--
extra : moz-landing-system : lando
2020-01-02 13:29:01 +00:00
Henrik Skupin 950468de8e Bug 1606290 - [remote] Disable more Puppeteer tests which crash the harness.
Depends on D58488

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

--HG--
extra : moz-landing-system : lando
2020-01-01 18:50:48 +00:00
Henrik Skupin 0951041609 Bug 1606290 - [remote] Re-enable Puppeteer tests for Firefox which do not crash.
Depends on D58487

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

--HG--
extra : moz-landing-system : lando
2020-01-01 18:28:34 +00:00
Henrik Skupin 7d9a72d23b Bug 1606317 - [remote] Disable Puppeteer tests in ignorehttpserrors.spec.js which crash the browser.
Differential Revision: https://phabricator.services.mozilla.com/D58487

--HG--
extra : moz-landing-system : lando
2020-01-01 18:51:51 +00:00
Mohit Singh 90811829d2 Bug 1601037 - options parameter set default to {} in Page.jsm:printToPDF() and IO.jsm:close() r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D58213

--HG--
extra : moz-landing-system : lando
2019-12-27 11:27:33 +00:00
Henrik Skupin 2dd64e92cd Bug 1590098 - [remote] Implement basic support for Network.getCookies. r=remote-protocol-reviewers,ato,maja_zf
This patch adds basic support for retrieving cookies,
which means that it returns the cookies for the currently
active target.

Hereby it has the following limitations:

1. It does not walk the frame tree, and as such only returns
the cookies from the top-level frame. Support for that will
be added once frames can correctly be handled, which means
once support for the JSWindowActor API has been landed.

2. The "urls" parameter is not supported because it is
unclear right now what it actually does. More investigation
is necessary before any implementation can happen.

3. There is no support for the file:// protocol yet.

4. Dot domains aren't taken care of yet.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 19:38:05 +00:00
Maja Frydrychowicz 84e1accdfe Bug 1605413 - Disable Puppeteer unit tests that crash the test harness
Differential Revision: https://phabricator.services.mozilla.com/D58008

--HG--
extra : moz-landing-system : lando
2019-12-20 17:38:57 +00:00
Maja Frydrychowicz 08af6c6582 Bug 1600959 - Implement Runtime.executionContextsCleared r=remote-protocol-reviewers,whimboo,ato
Differential Revision: https://phabricator.services.mozilla.com/D55868

--HG--
extra : moz-landing-system : lando
2019-12-19 19:58:52 +00:00
Andreas Tolfsen 5c0d22572b bug 1603451: remote: preserve test name from original task r=remote-protocol-reviewers,maja_zf,whimboo
The browser-chrome test name is derived from the function name.
The function name of the original task is lost when wrapped inside
the add_task() override in remote/test/browser/head.js.

This fixes the problem by rewriting the taskFn name on the new wrapper.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 14:58:30 +00:00
Andreas Tolfsen defc8d9410 bug 1603451: remote: document add_task() r=remote-protocol-reviewers,maja_zf,whimboo
The documentation for the overridden add_task() is quite poor.
Document it as to not confuse new developers why it is behaving
differently to the default bc add_task().

DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2019-12-18 12:53:52 +00:00
Mohit Singh d7b28ea9a2 Bug 1601037 - initialized option parameter present in 3 methods to default {} r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D57745

--HG--
extra : moz-landing-system : lando
2019-12-19 10:40:55 +00:00
Henrik Skupin 25fdbb9aff Bug 1599994 - [remote] Implement Page.printToPDF. r=remote-protocol-reviewers,ato,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D55961

--HG--
extra : moz-landing-system : lando
2019-12-16 16:19:04 +00:00
Henrik Skupin ce07f3fba4 Bug 1600058 - [remote] Implement IO.close. r=remote-protocol-reviewers,ato,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D55969

--HG--
extra : moz-landing-system : lando
2019-12-16 16:19:02 +00:00
Henrik Skupin 5a966347fc Bug 1600053 - [remote] Implement IO.read. r=remote-protocol-reviewers,baku,ato,maja_zf
This patch implements the IO.read() method to allow
reading streams for files and blobs.

Therefor all the methods in the IO domain need a registry
for streams. Those have to be stored globally because
they need to be kept existent across different client
connections.

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

--HG--
extra : moz-landing-system : lando
2019-12-16 16:17:59 +00:00
Henrik Skupin 162084495c Bug 1600053 - [remote] Add registry for managing references to streams. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D57304

--HG--
extra : moz-landing-system : lando
2019-12-16 16:17:47 +00:00
Kris Maglione 9853440599 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-13 20:36:24 +00:00
Kris Maglione 94e3b0bd8d 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-13 20:36:16 +00:00
Maja Frydrychowicz 260c75a1d1 Bug 1603266 - Flush irrelevant events when testing context creation; r=remote-protocol-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D57047

--HG--
extra : moz-landing-system : lando
2019-12-13 15:51:46 +00:00
Andreas Tolfsen b7a5c8548a 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-13 07:31:54 +00:00
Andreas Tolfsen ff89580849 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-13 07:30:23 +00:00
Henrik Skupin 947e858c46 Bug 1588622 - [remote] Implement "layoutViewport" and "contentSize" for Page.getLayoutMetrics. r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D56911

--HG--
extra : moz-landing-system : lando
2019-12-12 18:27:17 +00:00
Maja Frydrychowicz ab6bc896fd Bug 1597879 - Implement Page.addScriptToEvaluateOnNewDocument; r=remote-protocol-reviewers,whimboo,ato
Differential Revision: https://phabricator.services.mozilla.com/D55334

--HG--
extra : moz-landing-system : lando
2019-12-11 20:49:46 +00:00
shindli 91924fedc7 Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione 3ca78ce8e3 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-10 23:07:21 +00:00
Kris Maglione 16a9b29848 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-10 23:07:13 +00:00
Maja Frydrychowicz 9a359ea0c6 Bug 1597877 - Implement Page.createIsolatedWorld; r=remote-protocol-reviewers,whimboo,ato
This does not support the grantUniversalAccess parameter.
It just creates a new execution context.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 21:52:56 +00:00
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