1208 Commits

Author SHA1 Message Date
Julian Descottes
6f2ab5a719 Bug 1786255 - [messagehandler] Use session data to subscribe to browsingContext.contextCreated r=webdriver-reviewers,whimboo
Depends on D155060

The _subscribe/_unsubscribeEvent can be removed in the next patch

Differential Revision: https://phabricator.services.mozilla.com/D155061
2022-08-30 11:53:47 +00:00
Julian Descottes
d4bc15c1be Bug 1786255 - [messagehandler] Apply session data to Root layer modules r=webdriver-reviewers,whimboo
Depends on D155059

In order for all events to really use similar codepaths, they should not use different subscription mechanism.

Setting an event in SessionData should be the entry point for all modules to decide to update their listeners or not.
Therefore we will also call _applySessionData on root modules which support this.

Next patch will start using this for the browsingContext.contextCreated event.

Differential Revision: https://phabricator.services.mozilla.com/D155060
2022-08-30 11:53:47 +00:00
Julian Descottes
c2b9c6fa6a Bug 1786255 - [messagehandler] RootMessageHandler _applySessionData should return the session data update r=webdriver-reviewers,whimboo
The current version returns the return value of the command (which can be a broadcast, depending on the provided descriptor).
This makes it impossible to know what to consistently expect as a return value.

It seems it was only used for a test assertion, so rewrite the test and cleanup the return value

Differential Revision: https://phabricator.services.mozilla.com/D155059
2022-08-30 11:53:47 +00:00
Geoff Lankow
f8a55c3c79 Bug 1787081 - Remove Thunderbird special case from remote TabManager. r=whimboo,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D155529
2022-08-28 22:47:39 +00:00
Julian Descottes
7d8eb136be Bug 1783177 - [messagehandler] Merge internal and protocol events r=webdriver-reviewers,whimboo
We no longer distinguish between internal and protocol events within the framework.
All events now have the same behavior:
- emitted both under their own name and under the name message-handler-event
- bubble up to the root message handler
- the session which owns the RootMessageHandler does not listen for those events

The emitProtocolEvent has been moved to the RootMessageHandler only and can be used to emit events under a specific name "message-handler-protocol-event".
Only those events will be sent over to the actual client.

Internally the session module now keeps track of which events have already been subscribed to, to avoid forwarding duplicated events.
In a followup this will be centralized over in the EventsDispatcher, which can now play a bigger role.

Note that in the same way as for commands, there is still an implicit notion of "internal event", as in "an event which can not be subscribed to by consumers".
For commands this is done by having a "_" before the command name.
For events this is done by listing or not the event in the "supportedEvents" static array of the Module.

Differential Revision: https://phabricator.services.mozilla.com/D155025
2022-08-26 14:21:28 +00:00
Mark Banner
1a1669c8c4 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for remote. r=whimboo,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D155173
2022-08-26 13:39:37 +00:00
Alexandra Borovova
d42cab3b3c Bug 1756680 - Update links in Vendoring Puppeteer docs r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D155073
2022-08-23 09:07:43 +00:00
Alexandra Borovova
3b13e92b62 Bug 1756680 - [puppeteer] Sync puppeteer v16.1.1 r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D154912
2022-08-23 09:07:42 +00:00
harshrai654
b6c5f1c902 Bug 1776377 changed MessageHandler classes to use private class fields. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D154885
2022-08-22 07:23:08 +00:00
Henrik Skupin
c193147b7b Bug 1769994 - [remote] Resolve localhost to an IP before starting httpd.js. r=webdriver-reviewers,jdescottes
By resolving localhost to an actual IP for the httpd.js server
allows us to supply unique URLs for the CDP and WebDriver BiDi
WebSocket connection details and CDP's JSON handler end-points.

Hereby the first resolved IP will be used which should always be
the local IPv4 address (127.0.0.1). If IPv4 is disabled `[::1]`
will be used.

It will prevent issues especially on dualstack systems where DNS
resolution might prefer IPv6 over IPv4 (like with node.js > 16).

Differential Revision: https://phabricator.services.mozilla.com/D154151
2022-08-19 18:48:49 +00:00
Henrik Skupin
9e065aa42b Bug 1769994 - [remote] Set final host and port for chrome-remote-interface client. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D154150
2022-08-19 18:48:49 +00:00
Henrik Skupin
63bb86f569 Bug 1785092 - [remote] Added Realm class for Windows and Sandboxes. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D154973
2022-08-19 18:15:30 +00:00
Alexandra Borovova
41b3a21f9d Bug 1770480 - [bidi] Add support for script evaluation inside sandboxes for "script.evaluate" and "script.callFunction" commands. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153440
2022-08-17 14:35:02 +00:00
Henrik Skupin
69cedc69ba Bug 1784957 - [marionette] Don't fail when unregistering "browser-delayed-startup-finished" observer. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D154687
2022-08-16 11:37:14 +00:00
Henrik Skupin
b1c401d013 Bug 1398792 - [marionette] Waive Xrays in "WebDriver:GetElementProperty" to get unfiltered access to untrusted elements. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D154219
2022-08-10 18:30:54 +00:00
Alexandra Borovova
c389c09521 Bug 1779226 - Add support for serialization of plain JS objects with simple value fields. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153745
2022-08-04 19:15:18 +00:00
Iulian Moraru
197ca9977c Backed out changeset 0d0c8aa6e1d0 (bug 1746601) for causing wpt failures on iframe-chains.html. CLOSED TREE 2022-08-04 19:24:20 +03:00
James Graham
59ebc886d9 Bug 1746601 - Implement wheel input support in marionette, r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D139123
2022-08-04 13:30:58 +00:00
Alexandra Borovova
4928d6559f Bug 1779179 - Rename "+Infinity" to "Infinity" in serialization and deserialization. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D153729
2022-08-04 10:49:20 +00:00
Florian Quèze
6d15c3f4b2 Bug 1742842 - Workaround known issues in tests that currently keep vsync enabled forever, r=mconley,webdriver-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D153204
2022-08-01 16:04:15 +00:00
Tooru Fujisawa
a1a992d3cc Bug 1780543 - Part 2: Use eslint-env mozilla/frame-script consistently in test frame script. r=Standard8,webdriver-reviewers,perftest-reviewers,sparky,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D152427
2022-07-26 02:46:29 +00:00
Tooru Fujisawa
a6aabba5a4 Bug 1780543 - Part 1: Use eslint-env mozilla/frame-script consistently in frame script. r=Standard8,webdriver-reviewers,geckoview-reviewers,jdescottes,calu
Differential Revision: https://phabricator.services.mozilla.com/D152426
2022-07-26 02:46:28 +00:00
Julian Descottes
81897c2b7d Bug 1780752 - [bidi] Handle exception objects which don't support toString r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D152506
2022-07-22 19:51:41 +00:00
Emilio Cobos Álvarez
10a8d9eb8a Bug 1780212 - Consistently use sizemodechange events to minimize/restore windows. r=webdriver-reviewers,jdescottes
Like we do to maximize/fullscreen. This makes the code less confusing
and more reliable over-all.

Differential Revision: https://phabricator.services.mozilla.com/D152177
2022-07-19 21:31:57 +00:00
James Graham
e56d9c755b Bug 1543337 - Change some for (let _ of …) to for (const _ of …), r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D150812
2022-07-15 14:42:09 +00:00
James Graham
cce5215825 Bug 1543337 - Implement support for touch input in marionette, r=webdriver-reviewers,whimboo,jdescottes
Touch is a bit different to mouse inputs because there are often
multiple pointers (i.e. fingers) acting at the same time. It turns out
that Gecko wants a single call containing all the positions etc. of
the touch pointers for each event, rather than having a single call
per pointer. So we have to group the pointer actions from one tick
together.

Differential Revision: https://phabricator.services.mozilla.com/D139120
2022-07-15 14:42:08 +00:00
James Graham
58f8f3c0a9 Bug 1779694 - Await window closing during reftest cleanup, r=webdriver-reviewers,whimboo
If a reftest times out we close the window before the following
test. However because we weren't waiting for this close to complete
there was a race condition where the following test would fail with a
"browsing context was discarded".

Ensuring that we wait for the window to close in `abort` seems to be
sufficient to fix this issue.

Differential Revision: https://phabricator.services.mozilla.com/D151918
2022-07-15 11:33:48 +00:00
Henrik Skupin
1ed1175d97 Bug 1774476 - [cdp] Delay initialization of CDP until browserStartupFinished. r=webdriver-reviewers,jgraham
Initializing CDP before the first window has been opened can break
the registration of the first browser window because a pre-loaded
window gets opened first before the gBrowser is attached.

This also prevents any CDP client to connect to any the JSONHandler
end-points before CDP is actually ready.

Differential Revision: https://phabricator.services.mozilla.com/D151843
2022-07-15 06:30:34 +00:00
Zach Bloomquist
bf158e7643 Bug 1715366 - [CDP] Fix URL fragment handling in Network.requestWillBeSent. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D117559
2022-07-13 12:34:28 +00:00
Iulian Moraru
daab9825a4 Backed out 6 changesets (bug 1543337, bug 1756182) for causing multiple wpt failures. CLOSED TREE
Backed out changeset 48dac2cac9ee (bug 1756182)
Backed out changeset 122a095250a4 (bug 1543337)
Backed out changeset 9f7f9a7915fb (bug 1543337)
Backed out changeset 0c6c62853a16 (bug 1543337)
Backed out changeset 3fadd0a4cf4c (bug 1543337)
Backed out changeset b6f26244bf55 (bug 1543337)
2022-07-13 02:37:43 +03:00
James Graham
ccf619cde0 Bug 1543337 - Change some for (let _ of …) to for (const _ of …), r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D150812
2022-07-12 18:05:48 +00:00
James Graham
71bd61bee2 Bug 1543337 - Implement support for touch input in marionette, r=webdriver-reviewers,whimboo,jdescottes
Touch is a bit different to mouse inputs because there are often
multiple pointers (i.e. fingers) acting at the same time. It turns out
that Gecko wants a single call containing all the positions etc. of
the touch pointers for each event, rather than having a single call
per pointer. So we have to group the pointer actions from one tick
together.

Differential Revision: https://phabricator.services.mozilla.com/D139120
2022-07-12 18:05:47 +00:00
Julian Descottes
481846b3e9 Bug 1777460 - [bidi] Support "this" parameter for "script.callFunction" command r=webdriver-reviewers,whimboo
Depends on D150823

Differential Revision: https://phabricator.services.mozilla.com/D150824
2022-07-12 16:19:32 +00:00
Julian Descottes
b7742d679e Bug 1770492 - [bidi] Support basic "arguments" for "script.callFunction" command r=webdriver-reviewers,whimboo
Depends on D151529

Differential Revision: https://phabricator.services.mozilla.com/D150823
2022-07-12 16:19:31 +00:00
Julian Descottes
53f88bc86d Bug 1770492 - [bidi] RemoteValue deserialize should throw when type is not a string r=webdriver-reviewers,whimboo
Depends on D151034

Differential Revision: https://phabricator.services.mozilla.com/D151529
2022-07-12 16:19:31 +00:00
Julian Descottes
75eac83967 Bug 1770492 - [messagehandler] Support emitting protocol errors from MessageHandler modules r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151034
2022-07-12 16:19:30 +00:00
Alexandra Borovova
61d71c792e Bug 1777951 - Enable partially implemented WebDriver BIDi features on Nightly channel only. r=webdriver-reviewers,whimboo,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D151364
2022-07-12 15:55:37 +00:00
Bogdan Szekely
9e138df7de Backed out 6 changesets (bug 1756182, bug 1543337) for causing wpt failures on pointerevent_attributes_hoverable_pointers.html
Backed out changeset 60ee209b5c23 (bug 1756182)
Backed out changeset fcb9effe543d (bug 1543337)
Backed out changeset f0192382bd67 (bug 1543337)
Backed out changeset 2982c3f1cee3 (bug 1543337)
Backed out changeset dcf8d6675ecb (bug 1543337)
Backed out changeset a2a4ccd34675 (bug 1543337)
2022-07-12 16:02:14 +03:00
James Graham
dc97e1ee9d Bug 1543337 - Change some for (let _ of …) to for (const _ of …), r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D150812
2022-07-12 12:00:29 +00:00
James Graham
55e6b2248e Bug 1543337 - Implement support for touch input in marionette, r=webdriver-reviewers,whimboo,jdescottes
Touch is a bit different to mouse inputs because there are often
multiple pointers (i.e. fingers) acting at the same time. It turns out
that Gecko wants a single call containing all the positions etc. of
the touch pointers for each event, rather than having a single call
per pointer. So we have to group the pointer actions from one tick
together.

Differential Revision: https://phabricator.services.mozilla.com/D139120
2022-07-12 12:00:28 +00:00
Tooru Fujisawa
54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel
7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Julian Descottes
655537ec77 Bug 1767295 - [remote] Extend unload timeout for navigation on slow platforms r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151072
2022-07-11 16:02:31 +00:00
Tooru Fujisawa
8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa
bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tooru Fujisawa
f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Henrik Skupin
fc98681137 Bug 1775141 - [webdriver-bidi] Send live "browsingContext.contextCreated" events with "about:blank" as URL. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D151321
2022-07-08 10:01:47 +00:00
Julian Descottes
87ebacdf14 Bug 1750541 - [bidi] Implement basic support for "script.callFunction" command r=webdriver-reviewers,whimboo
Depends on D150245

Differential Revision: https://phabricator.services.mozilla.com/D150822
2022-07-06 19:34:33 +00:00
Julian Descottes
25cf447901 Bug 1770477 - [bidi] Return the innerWindowId as realm id for script.evaluate r=webdriver-reviewers,jgraham,whimboo
Depends on D149413

Differential Revision: https://phabricator.services.mozilla.com/D150245
2022-07-06 19:34:32 +00:00
Julian Descottes
62cafcc5f3 Bug 1770477 - [bidi] Handle javascript errors in script.evaluate r=webdriver-reviewers,whimboo
Depends on D150467

Differential Revision: https://phabricator.services.mozilla.com/D149413
2022-07-06 19:34:32 +00:00