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

398 Коммитов

Автор SHA1 Сообщение Дата
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