Commit Graph
191 Commits
Author SHA1 Message Date
Julian Descottes edef64bc2e Bug 2024832 - [bidi] Add WebDriver BiDi moz:debugging module r=ochameau,bomsy,whimboo,bthrall
Differential Revision: https://phabricator.services.mozilla.com/D288831
2026-06-11 19:45:55 +00:00
elkal98 adeb257729 Bug 1972065 - Add new categories to SessionData module to be used instead of hardcoded strings. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D302335
2026-06-01 17:14:36 +00:00
ulricharmin 4065d26b6e Bug 2031598 - Remove unused function getRootMessageHandler. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D294375
2026-04-15 12:27:32 +00:00
Julian Descottes abf52aa74b Bug 2029978 - [remote] Prevent all script evaluation commands on parent process contexts r=whimboo
Differential Revision: https://phabricator.services.mozilla.com/D292489
2026-04-14 06:36:33 +00:00
Julian Descottes 0450ac1329 Bug 2027762 - [remote] Only allow specific commands from windowglobal modules r=Sasha
Differential Revision: https://phabricator.services.mozilla.com/D290938
2026-04-10 09:09:34 +00:00
Julian Descottes c91fea99a7 Bug 1936770 - [remote] Allow to emit an event for several related contexts r=Sasha
To support realm events for shared and service workers - which can have more than 1 related context - we need to adapt our logic to match several browsing contexts to a single context descriptor.

On the bidi spec, this is expressed in the event is enabled algorithm (https://w3c.github.io/webdriver-bidi/#event-is-enabled )which takes an array of navigables as parameter. In order to enable this, a few event-related APIs are modified to support matching several browsing context ids.

We should be able to emit an event related to N contexts, and the event should be emitted if:
- any subscription monitors any of the related contexts
- any subscription monitors the user context of any of the related contexts
- any subscription is global

Note that this allows to emit an event related to 0 browsing contexts. In that case, global subscriptions should still get the event.
While this is handy given that we can't currently retrieve the contexts related to service and shared worker, this is also an important feature in the long run.
It is completely possible to have a worker instance for a service worker which. starts running even if no related context is open at the moment.

A dedicated browser mochitest is added to cover the new feature.

Differential Revision: https://phabricator.services.mozilla.com/D282748
2026-02-13 20:02:57 +00:00
Julian Descottes 72f09d6ff0 Bug 1936766 - [remote] Add Worker helpers to monitor and retrieve worker debuggers r=whimboo
Differential Revision: https://phabricator.services.mozilla.com/D280442
2026-02-06 06:50:14 +00:00
Henrik Skupin c7904291c0 Bug 1934326 - [remote] Check for browsing context discarded in "waitForCurrentWindowGlobal()". r=Sasha
Differential Revision: https://phabricator.services.mozilla.com/D277409
2025-12-23 12:25:20 +00:00
Henrik Skupin dea83376f2 Bug 1944570 - [remote] Only use the webprogress in the RootTransport module for content browsing contexts. r=Sasha
Differential Revision: https://phabricator.services.mozilla.com/D276802
2025-12-18 12:31:53 +00:00
Henrik Skupin 2be355c689 Bug 1944570 - [remote] Allow loading the MessageHandlerFrameActor for chrome scope. r=Sasha
Differential Revision: https://phabricator.services.mozilla.com/D276801
2025-12-18 12:31:50 +00:00
Henrik Skupin d2389bab99 Bug 1944568 - [remote] Update BrowsingContextInfo for process related properties. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D270534
2025-12-09 14:08:43 +00:00
Henri SivonenandVincent Hilla 39a8a4171b Bug 543435 - Make initial about:blank not get overwritten by an async about:blank load. r=sessionstore-reviewers,sfoster,timhuang,credential-management-reviewers,issammani,webidl,extension-reviewers,tabbrowser-reviewers,migration-reviewers,home-newtab-reviewers,hsivonen,cookie-reviewers,fxview-reviewers,firefox-desktop-core-reviewers ,dao,valentin,mossop,smaug,geckoview-reviewers,Jamie,mtigley,thecount,media-playback-reviewers,padenot,dom-worker-reviewers,jesup,jdescottes,asuth,robwu,karlt,profiler-reviewers,kpatenio,devtools-reviewers,tcampbell,nchevobbe
Co-authored-by: Vincent Hilla <[email protected]>
Signed-off-by: Vincent Hilla <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D155376
2025-11-24 05:34:22 +00:00
Mark Banner fde74f7d41 Bug 1994217 - Enable ESLint rule jsdoc/no-bad-blocks. r=frontend-codestyle-reviewers,webdriver-reviewers,credential-management-reviewers,search-reviewers,fxview-reviewers,places-reviewers,whimboo,nsharpley,scunnane,Gijs,mtigley,daisuke
Mainly manual fixes to fix issues found in the jsdoc comments now that they're recognised correctly.

Also removes some configuration that is no longer needed as it is now the default.

Differential Revision: https://phabricator.services.mozilla.com/D268569
2025-10-17 11:18:43 +00:00
Narcis Beleuzu 89c0ffec7c Revert "Bug 1994217 - Enable ESLint rule jsdoc/no-bad-blocks on the rest of the tree. r=frontend-codestyle-reviewers,Gijs" for causing Documentation opt failure
This reverts commit 987c3ad130.

This reverts commit 1c5b20a293.

This reverts commit 0a9a458465.
2025-10-16 21:32:01 +00:00
Mark Banner 1c5b20a293 Bug 1994217 - Enable ESLint rule jsdoc/no-bad-blocks. r=frontend-codestyle-reviewers,webdriver-reviewers,credential-management-reviewers,search-reviewers,fxview-reviewers,places-reviewers,whimboo,nsharpley,scunnane,Gijs,mtigley,daisuke
Mainly manual fixes to fix issues found in the jsdoc comments now that they're recognised correctly.

Also removes some configuration that is no longer needed as it is now the default.

Differential Revision: https://phabricator.services.mozilla.com/D268569
2025-10-16 10:58:11 +00:00
Alexandra Borovova caf132b115 Bug 1987935 - [bidi] Implement "emulation.setUserAgentOverride" command. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D265764
2025-09-26 12:45:56 +00:00
Julian Descottes 3a4933ce92 Bug 1984953 - [bidi] Avoid log pollution from content process modules after session is destroyed r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D262318
2025-08-25 10:45:28 +00:00
Julian Descottes de4eed1409 Bug 1949037 - [remote] Update TabManager.browsers to only return loaded browsers r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D260795
2025-08-14 08:40:33 +00:00
Cosmin Sabou b364372550 Revert "Bug 1949037 - [remote] Update TabManager.browsers to only return loaded browsers r=webdriver-reviewers,whimboo" for causing wd failures related to lazy.TabManager.browsers.
This reverts commit 7248568fcd.
2025-08-13 23:42:57 +00:00
Julian Descottes 7248568fcd Bug 1949037 - [remote] Update TabManager.browsers to only return loaded browsers r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D260795
2025-08-13 12:40:58 +00:00
Julian Descottes e4d7d91b83 Bug 1981183 - Enable codespell linter for most remote/ folders r=webdriver-reviewers,Sasha
Differential Revision: https://phabricator.services.mozilla.com/D259998
2025-08-06 14:02:32 +00:00
Liam DeBeasi 7c415b316a Bug 1754273 - Emit browsingContext.contextCreated event for all open contexts when subscribing to the event. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D255729
2025-08-04 09:15:30 +00:00
Alexandra Borovova c7a910f98f Bug 1978533 - [bidi] Apply the locale override also when iframes are created. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D258194
2025-07-24 11:57:53 +00:00
Sabina Zaripova 39b1f01461 Bug 1972865 - Add hasSessionData helper and private properties. r=jdescottes,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D256002
2025-07-21 15:18:00 +00:00
Julian Descottes edd7f3b603 Bug 1733242 - [remote] Update MessageHandler ModuleCache to handle nested layers r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D253823
2025-06-23 19:02:43 +00:00
Julian Descottes c8ba89c73e Bug 1945184 - [bidi] Implement browsingContext.navigationCommitted event r=webdriver-reviewers,Sasha
Differential Revision: https://phabricator.services.mozilla.com/D249644
2025-05-23 22:40:02 +00:00
iulian moraru 46e2e19b80 Revert "Bug 1945184 - [bidi] Implement browsingContext.navigationCommitted event r=webdriver-reviewers,Sasha" for causing wpt failures on prefetch-transfer-size-executor.html.
This reverts commit 21c296b19f.
2025-05-23 18:28:55 +00:00
Julian Descottes 21c296b19f Bug 1945184 - [bidi] Implement browsingContext.navigationCommitted event r=webdriver-reviewers,Sasha
Differential Revision: https://phabricator.services.mozilla.com/D249644
2025-05-23 13:59:24 +00:00
Julian Descottes 552e1f0e33 Bug 1930616 - [remote] Prototype parent process NavigationListener r=webdriver-reviewers,Sasha
Depends on D245945

Differential Revision: https://phabricator.services.mozilla.com/D245946
2025-04-29 06:59:18 +00:00
Butkovits Atila 53687eeb3d Backed out 2 changesets (bug 1936774) as requested by Julian. CLOSED TREE
Backed out changeset 35f43832e05c (bug 1936774)
Backed out changeset 842565c0705e (bug 1936774)
2025-04-29 09:47:02 +03:00
Julian Descottes ea1907fec4 Bug 1936774 - [remote] Prototype parent process NavigationListener r=webdriver-reviewers,Sasha
Depends on D245945

Differential Revision: https://phabricator.services.mozilla.com/D245946
2025-04-29 06:31:17 +00:00
Julian Descottes c07b83c86e Bug 1936874 - [remote] EventsDispatcher should retrieve browsing contexts via BrowsingContext.get r=webdriver-reviewers,whimboo
All context ids handled by the events dispatcher are actual browsing context ids and not
TabManager UUIDs, there is no reason to use getBrowsingContextById here.

Differential Revision: https://phabricator.services.mozilla.com/D231971
2025-04-01 11:54:29 +00:00
Julian Descottes 455ae009d6 Bug 1868828 - [remote] Add support for vendor specific WebDriver BiDi modules r=webdriver-reviewers,whimboo
This adds tests and framework support for vendored modules in MessageHandler

We also add the moz: prefix to the WebDriver BiDi ModuleRegistry

Differential Revision: https://phabricator.services.mozilla.com/D241233
2025-03-25 12:50:28 +00:00
Julian Descottes 71bd429b58 Bug 1950217 - [remote] Add logs when MessageHandler commands timeout r=webdriver-reviewers,whimboo
This changeset updates the Parent JSWindowActor for MessageHandler to
send "ping" messages when a command takes more than 10 seconds to reply.

The "ping" message is expected to respond under 1 second, otherwise a warning
will be logged.

In the future, the JSWindowActor pair should be marked as blocked if the ping
fails and all pending commands should be canceled, future commands should be
rejected.

A browser mochitest is added to make sure the expected logs are generated.

Differential Revision: https://phabricator.services.mozilla.com/D239391
2025-02-25 08:13:07 +00:00
Alexandra Borovova e8de2e9d50 Bug 1938604 - Wait for the tab browser to load in the mochitest for updating session data per user context. CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D237556
2025-02-10 12:25:45 +00:00
Alexandra Borovova dec34d2c63 Bug 1938604 - [bidi] Add support for "userContexts" argument to "sessions.subscribe" command. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D236692
2025-02-10 10:48:43 +00:00
Alexandra Borovova 3c9bf3b030 Bug 1940927 - [messagehandler] Introduce UserContext context descriptor. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D235928
2025-01-31 15:38:29 +00:00
Narcis Beleuzu 266bfeb4c5 Backed out 4 changesets (bug 1940927) for causing WD failure on add_preload_script.py . CLOSED TREE
Backed out changeset 9c354a5fddb0 (bug 1940927)
Backed out changeset f66201e2bcd6 (bug 1940927)
Backed out changeset d79bb21484f4 (bug 1940927)
Backed out changeset 3b99aec7915d (bug 1940927)
2025-01-31 17:01:36 +02:00
Alexandra Borovova dcd3c5c789 Bug 1940927 - [messagehandler] Introduce UserContext context descriptor. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D235928
2025-01-31 13:45:45 +00:00
Henrik Skupin b3b89d930f Bug 1932916 - [remote] Don't retry to run a command when the browsing context was discarded. r=webdriver-reviewers,sessionstore-reviewers,jdescottes,sclements
Differential Revision: https://phabricator.services.mozilla.com/D230662
2024-12-02 14:59:51 +00:00
Henrik Skupin 29987a49f5 Bug 1932916 - [remote] Throw DiscardedBrowsingContextError if currentWindowGlobal cannot be found in waitForCurrentWindowGlobal().. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D230661
2024-12-02 14:59:50 +00:00
Julian Descottes 98c1f1c46a Bug 1927144 - [remote] Fix test helper hasPromiseResolved r=webdriver-reviewers,whimboo
Depends on D226890

Differential Revision: https://phabricator.services.mozilla.com/D227017
2024-10-29 13:14:19 +00:00
Henrik Skupin 3d007aa2e6 Bug 1927073 - [remote] Retrieve new browsing context if old one was replaced when forwarding a command to the window global. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D226890
2024-10-29 05:56:05 +00:00
Julian Descottes b4b5799a9f Bug 1923899 - [bidi] Wait for currentWindowGlobal when sending commands to window global message handlers r=webdriver-reviewers,Sasha
When attempting to send commands on a very early browsing context, the command might fail
due to a missing currentWindowGlobal.
This patch adds a helper to wait for the currentWindowGlobal property to be set and uses it from
RootTransport in order to avoid this issue.
A browser mochitest is added to cover this scenario.

Differential Revision: https://phabricator.services.mozilla.com/D225281
2024-10-15 14:33:29 +00:00
Liam DeBeasi 228d829166 Bug 1916498 - Add _forwardToWindowGlobal helper r=jdescottes,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224880
2024-10-15 08:31:01 +00:00
Julian Descottes 8c4e0b3419 Bug 1921756 - [bidi] Avoid errors on uninitialized browsingContexts during command broadcast r=webdriver-reviewers,whimboo
The isExtensionContext and isParentProcess browsing context helpers could throw if the
browsingContext did not have a valid currentWindowGlobal property.

Here we perform an early check on currentWindowGlobal from the only caller of those helpers, which
is isBrowsingContextCompatible. For this helper, it makes sense to return false if the browsing
context is not correctly attached yet. But it is more difficult to return a meaningful value
from isExtensionContext or isParentProcess, because those 2 helpers cannot assess the browsing
context correctly.

Differential Revision: https://phabricator.services.mozilla.com/D224238
2024-10-03 08:46:22 +00:00
Henrik Skupin 0d3965f55f Bug 1854942 - [remote] Retry invocation of module methods automatically. r=webdriver-reviewers,jdescottes
The message handler framework now automatically retries executing
module methods in the window global if the corresponding
JSWindowActor pair is destroyed or becomes inactive.

This behavior can be disabled by setting the preference
"remote.retry-on-abort" to false, in which case retries
will only occur during the initial navigation.

Additionally, the behavior can be explicitly controlled
by individual callers by passing the "retryOnAbort" flag.

Differential Revision: https://phabricator.services.mozilla.com/D223398
2024-09-25 13:05:51 +00:00
Julian Descottes c3aa17d793 Bug 1918672 - [bidi] Retry all commands if the browsing context is loading or is initial r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D222602
2024-09-19 12:05:46 +00:00
Mark Banner 3fcfd0372d Bug 1870226 - Use typescript Record definitions rather than Object<> generic forms for jsdoc. r=zombie,webdriver-reviewers,omc-reviewers,aminomancer,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D219511
2024-08-23 16:43:56 +00:00
Butkovits Atila 11a5a23896 Backed out 7 changesets (bug 1870226) for causing build bustages. CLOSED TREE
Backed out changeset 619244623dba (bug 1870226)
Backed out changeset e85a5647cae4 (bug 1870226)
Backed out changeset 21ea9baf83ea (bug 1870226)
Backed out changeset a506c0f0ce28 (bug 1870226)
Backed out changeset 77c78201a206 (bug 1870226)
Backed out changeset 7a98dfef087f (bug 1870226)
Backed out changeset f64ad89c2406 (bug 1870226)
2024-08-23 12:22:02 +03:00