Commit Graph
279 Commits
Author SHA1 Message Date
Sylvestre Ledru b12265956b Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,webdriver-reviewers,glandium,whimboo
done with: rustfmt 1.7.0-stable (25ef9e3 2024-04-09)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D207645
2024-04-18 08:50:15 +00:00
Mike Hommey e0ad005e87 Bug 1889260 - Remove redundant imports from webdriver. r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D206440
2024-04-03 06:54:25 +00:00
James Hendry efecbe5621 Bug 1847875: [geckodriver] Require FrameId to be passed explicitly and correct Marionette to Top r=whimboo,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D197435
2024-01-25 07:53:15 +00:00
Makoto Kato 514dba6453 Bug 1847521 - Replace unicode-segmentation with ICU4X in WebDriver. r=webdriver-reviewers,supply-chain-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D198132
2024-01-18 02:29:19 +00:00
James Hendry 271983e507 Bug 1866776 - [webdriver] Remove "UnknownPath" error (not in specification) from webdriver r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D196177
2023-12-13 10:34:56 +00:00
James Hendry 52940c6193 Bug 1866273: Use thiserror crate for webdriver r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D194693
2023-11-29 15:54:18 +00:00
Razvan Cojocaru 2336eec5c5 Bug 1865315 - Fix clippy lint issues for geckodriver, webdriver, and mozbase rust modules. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D193968
2023-11-20 09:28:56 +00:00
James Graham 6e6eebceed Bug 1857193 - Make passing --port=0 select a free port, r=webdriver-reviewers,jdescottes
Previously this bound to a free port, but we weren't allowing
connections because we checked the Host header against the specified
port (i.e. 0) rather than the bound port.

Differential Revision: https://phabricator.services.mozilla.com/D189925
2023-10-06 07:35:43 +00:00
Mike Hommey 1f4e72d148 Bug 1852174 - Upgrade webdriver to base64 0.21. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D187733
2023-09-10 22:26:07 +00:00
Mitesh Gulecha 6e694fa8b3 Bug 1682497 - [geckodriver] Added Page Range for Integers r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D182624
2023-08-21 09:01:34 +00:00
Dana Keeler e8d8f42d51 Bug 1676679 - support virtual authenticator functions in webdriver r=webdriver-reviewers,jgraham,whimboo
Depends on D185198

Differential Revision: https://phabricator.services.mozilla.com/D162624
2023-08-09 20:47:56 +00:00
Cristian Tuns 7c929717f0 Backed out 11 changesets (bug 1676679, bug 1846574, bug 1838526, bug 1546662, bug 1838945, bug 1844136, bug 1838938, bug 1839517, bug 1838894) for causing wpt failures in response.py CLOSED TREE
Backed out changeset cfb72ec53461 (bug 1838894)
Backed out changeset 48d93b2327bf (bug 1838894)
Backed out changeset 1b600408020d (bug 1676679)
Backed out changeset 199a69c94e56 (bug 1846574)
Backed out changeset 0fd66a02d9ef (bug 1844136)
Backed out changeset cede3491e7fb (bug 1838894)
Backed out changeset cdfe8b080bad (bug 1838938)
Backed out changeset ddb81e7713a7 (bug 1546662)
Backed out changeset 61c7382a4a2e (bug 1838945)
Backed out changeset 29ccda7bfd30 (bug 1838526)
Backed out changeset b4e59c6a2f8f (bug 1839517)
2023-08-08 19:05:21 -04:00
Dana Keeler 0855834235 Bug 1676679 - support virtual authenticator functions in webdriver r=webdriver-reviewers,jgraham,whimboo
Depends on D185198

Differential Revision: https://phabricator.services.mozilla.com/D162624
2023-08-08 18:00:21 +00:00
Narcis Beleuzu 5c5379572f Backed out 11 changesets (bug 1838526, bug 1844136, bug 1838945, bug 1676679, bug 1846574, bug 1838894, bug 1546662, bug 1838938, bug 1839517) for bustages on command.rs . CLOSED TREE
Backed out changeset c44c58c8dede (bug 1838894)
Backed out changeset 4fe735c1a95e (bug 1838894)
Backed out changeset af356c621a91 (bug 1676679)
Backed out changeset 81ecf285cf3b (bug 1846574)
Backed out changeset 3f9e8ad9d84d (bug 1844136)
Backed out changeset 8bba03cfc986 (bug 1838894)
Backed out changeset f2f744b2f30f (bug 1838938)
Backed out changeset 965ced29c013 (bug 1546662)
Backed out changeset 76dfd07dd58c (bug 1838945)
Backed out changeset c2e3279c2f1e (bug 1838526)
Backed out changeset 9a36bf4b0dbe (bug 1839517)
2023-08-08 07:07:31 +03:00
Dana Keeler f54748f677 Bug 1676679 - support virtual authenticator functions in webdriver r=webdriver-reviewers,jgraham,whimboo
Depends on D185198

Differential Revision: https://phabricator.services.mozilla.com/D162624
2023-08-08 02:03:44 +00:00
Julian Descottes e4c861abb9 Bug 1820782 - [geckodriver] Add support for getComputedLabel and getComputedRole r=webdriver-reviewers,whimboo
Depends on D172155

Differential Revision: https://phabricator.services.mozilla.com/D172147
2023-03-20 21:46:02 +00:00
Alexandra Borovova 30c057fe7f Bug 1700097 - [geckodriver] Add support for Find Element(s) From Shadow Root. r=webdriver-reviewers,jgraham,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D172416
2023-03-16 19:19:41 +00:00
Henrik Skupin 018172d506 Bug 1807248 - [geckodriver] Fix clippy lint warnings for all the crates. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D165465
2023-01-03 19:26:37 +00:00
Erich Gubler 8ee889791e Bug 1806156: Fix webdriver::server::build_warp_routes compile failures with Rust 1.66 r=webdriver-reviewers,jgraham
See also the following links from upstream:

* Issue: <https://github.com/seanmonstar/warp/issues/1013>
* Resolution:
<https://github.com/seanmonstar/warp/issues/1012#issuecomment-1353651684>

Differential Revision: https://phabricator.services.mozilla.com/D164921
2022-12-16 21:42:15 +00:00
James Graham de259e7c00 Bug 1781066 - Disallow missing pointerMove / wheel scroll coordinates, r=webdriver-reviewers,whimboo
The spec claims that undefined is allowed for these values, but later
treats them as if they're always integers. I suspect the original
intent was to default to 0, but since there seems to be interop around
rasing an exception, make geckodriver and marionette explicitly check
for valid integers and disallow missing/undefined values.

Differential Revision: https://phabricator.services.mozilla.com/D152645
2022-09-19 16:25:12 +00:00
Butkovits Atila c7735a82ba Backed out changeset 95bc55ad64d7 (bug 1781066) for causing linting failures. CLOSED TREE 2022-09-14 21:07:02 +03:00
James Graham 561e2a99d2 Bug 1781066 - Disallow missing pointerMove / wheel scroll coordinates, r=webdriver-reviewers,whimboo
The spec claims that undefined is allowed for these values, but later
treats them as if they're always integers. I suspect the original
intent was to default to 0, but since there seems to be interop around
rasing an exception, make geckodriver and marionette explicitly check
for valid integers and disallow missing/undefined values.

Differential Revision: https://phabricator.services.mozilla.com/D152645
2022-09-14 17:48:17 +00:00
James Graham d02aa3b27b Bug 1746601 - Implement wheel input support in marionette, r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D139123
2022-09-08 13:45:22 +00:00
James Graham c9a2917e3d Bug 1773265 - Update pointer input support in webdriver crate, r=webdriver-reviewers,whimboo
Add all the additional pointer properties defined in spec to the
webdriver crate so they can be used by clients when supported by the
browser.

Differential Revision: https://phabricator.services.mozilla.com/D144813
2022-06-13 09:03:34 +00:00
Cosmin Sabou 38a365ffa8 Backed out 2 changesets (bug 1773265, bug 1773264) for causing wpt mouse-pointer related failures.
Backed out changeset a4dd1e07fbf5 (bug 1773265)
Backed out changeset 96fbfb8cd08a (bug 1773264)
2022-06-09 18:57:30 +03:00
James Graham c90a599521 Bug 1773265 - Update pointer input support in webdriver crate, r=webdriver-reviewers,whimboo
Add all the additional pointer properties defined in spec to the
webdriver crate so they can be used by clients when supported by the
browser.

Differential Revision: https://phabricator.services.mozilla.com/D144813
2022-06-09 12:55:28 +00:00
Mike Hommey 36a8b652f9 Bug 1710421 - Bustage fix. CLOSED TREE 2022-06-02 01:57:01 +03:00
Mike Hommey bfc979cd84 Bug 1710421 - [webdriver] Update warp and hyper dependencies. r=mjf,webdriver-reviewers
At the same time, update mdns_service to socket2 0.4 to avoid a duplicate.

Differential Revision: https://phabricator.services.mozilla.com/D147479
2022-06-01 22:05:53 +00:00
Marian-Vasile Laza 3e60395bf9 Backed out 6 changesets (bug 1772068, bug 1710421) for causing multiple web-platform failures. CLOSED TREE
Backed out changeset 7dc183461431 (bug 1772068)
Backed out changeset 437682fe4871 (bug 1772068)
Backed out changeset 717912ea0672 (bug 1772068)
Backed out changeset 6790f990c322 (bug 1772068)
Backed out changeset 33831638ba99 (bug 1710421)
Backed out changeset b35aaa56fa54 (bug 1710421)
2022-06-01 15:01:10 +03:00
Mike Hommey 863a2cecc2 Bug 1710421 - [webdriver] Update warp and hyper dependencies. r=mjf,webdriver-reviewers
At the same time, update mdns_service to socket2 0.4 to avoid a duplicate.

Differential Revision: https://phabricator.services.mozilla.com/D147479
2022-06-01 09:57:13 +00:00
Marian-Vasile Laza 8acd2f6a04 Backed out 2 changesets (bug 1710421) for causing web-platform failures on context.rs. CLOSED TREE
Backed out changeset bdd6f29ebeeb (bug 1710421)
Backed out changeset 1739da34411f (bug 1710421)
2022-06-01 10:34:41 +03:00
Mike Hommey 59dc8e3445 Bug 1710421 - [webdriver] Update warp and hyper dependencies. r=mjf,webdriver-reviewers
At the same time, update mdns_service to socket2 0.4 to avoid a duplicate.

Differential Revision: https://phabricator.services.mozilla.com/D147479
2022-06-01 06:44:07 +00:00
Henrik Skupin a440fb981b Bug 1755312 - [geckodriver] Clippy and rustfmt fixes. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D141453
2022-03-25 12:18:18 +00:00
Iulian Moraru 47a9f8b828 Backed out 2 changesets (bug 1755312) for causing wd failures on marionette_port.py. CLOSED TREE
Backed out changeset 6c795bd3f3d4 (bug 1755312)
Backed out changeset 4bb6093b4db3 (bug 1755312)
2022-03-22 18:14:51 +02:00
Henrik Skupin 99a77ef868 Bug 1755312 - [geckodriver] Clippy and rustfmt fixes. r=webdriver-reviewers,jgraham
Depends on D141358

Differential Revision: https://phabricator.services.mozilla.com/D141453
2022-03-22 12:33:47 +00:00
James Graham c9b2b75746 Bug 1732622 - Enable allowing given hosts and origins for geckodriver, r=webdriver-reviewers,freddyb,whimboo
The policy is now as follows:

* The `--host` command line flag can now be an actual hostname as well
  as in IP address.

* By default only requests with a `Host` header that is an IP address,
  or matching the value of the `--host` argument are accepted.

* If `--host` is a local IP address, we by default accept `localhost`
  in the `Host` header.

* When `--allow-hosts` is provided, only requests with a hostname
  matching the listed values, or an IP address, are accepted.

* By default any request with an `Origin` header is rejected.

* When `--allow-origins` is provided, only requests with no `Origin`
  header, or an origin matching the given values, are accepted.

Differential Revision: https://phabricator.services.mozilla.com/D129012
2022-01-17 15:37:20 +00:00
Marian-Vasile Laza cfec407eaa Backed out 3 changesets (bug 1732622) for causing build bustages on server.rs. CLOSED TREE
Backed out changeset ab9d1e14386a (bug 1732622)
Backed out changeset 577a5b37f781 (bug 1732622)
Backed out changeset 46f1fb7f6fc0 (bug 1732622)
2022-01-17 16:38:26 +02:00
James Graham 08d19d02c1 Bug 1732622 - Enable allowing given hosts and origins for geckodriver, r=webdriver-reviewers,freddyb,whimboo
The policy is now as follows:

* The `--host` command line flag can now be an actual hostname as well
  as in IP address.

* By default only requests with a `Host` header that is an IP address,
  or matching the value of the `--host` argument are accepted.

* If `--host` is a local IP address, we by default accept `localhost`
  in the `Host` header.

* When `--allow-hosts` is provided, only requests with a hostname
  matching the listed values, or an IP address, are accepted.

* By default any request with an `Origin` header is rejected.

* When `--allow-origins` is provided, only requests with no `Origin`
  header, or an origin matching the given values, are accepted.

Differential Revision: https://phabricator.services.mozilla.com/D129012
2022-01-17 14:02:26 +00:00
David Burns e15767b65c Bug 1700093 - [geckodriver] Add support for "Get Element Shadow Root" r=webdriver-reviewers,whimboo,jgraham
This adds the support for "Get Element Shadow Root" from the WebDriver specification:
https://w3c.github.io/webdriver/#get-element-shadow-root

Differential Revision: https://phabricator.services.mozilla.com/D110938
2021-12-03 14:02:21 +00:00
James Graham 3f5eccf971 Bug 1736991 - Fix clippy warnings in webdriver crate, r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D129129
2021-10-22 11:46:31 +00:00
James Graham a2335d8cf9 Bug 1652612 - More explictly only allow connections from local origins, r=whimboo,webdriver-reviewers
If an origin header is supplied with the request, validate it
corresponds to a service running on localhost.

Differential Revision: https://phabricator.services.mozilla.com/D120387
2021-07-29 19:34:08 +00:00
James Graham e9c0f69dda Bug 1652612 - Validate the Host header when starting GeckoDriver sessions, , freddy r=webdriver-reviewers,whimboo
Check that the Host header is set and that the host and port are local
or match the address that the WebDriver server is running on.

Differential Revision: https://phabricator.services.mozilla.com/D83499
2021-07-29 19:34:07 +00:00
Andi-Bogdan Postelnicu d1c8d220c4 Bug 1617369 - Reformat recent rust changes with rustfmt r=necko-reviewers,webdriver-reviewers,kvark
Updated with rustfmt 1.4.36-stable (7de6968 2021-02-07)

Differential Revision: https://phabricator.services.mozilla.com/D117906
2021-06-17 11:00:22 +00:00
Henrik Skupin 4e5848d694 Bug 1693004 - [geckodriver] Add support for the "webSocketUrl" capability. r=webdriver-reviewers,jgraham
The "webSocketUrl" capability offers an opt-in
mechanism for WebDriver HTTP implementations to
make use of WebDriver BiDi, the bi-directional
protocol based on a WebSocket connection.

If the used version of Firefox has support for
WebDriver BiDi enabled, and the capability is
set to "true", it will be returned as part of
the "New Session" capabilities and contains
the host and port of the WebSocket server.

Differential Revision: https://phabricator.services.mozilla.com/D116689
2021-06-09 18:15:11 +00:00
James Graham 6a28d32796 Bug 1715209 - [geckodriver] Fix handling of implicit session delete return value. r=webdriver-reviewers,whimboo
The arguments to map_or_else were the wrong way around. Since it's easier to read in this case
switch over to an explicit match statement.

Differential Revision: https://phabricator.services.mozilla.com/D117155
2021-06-08 19:26:50 +00:00
James Graham a08ee30760 Bug 1443520 - Move session deletion on teardown into webdriver lib, r=webdriver-reviewers,whimboo
Currently we have a `delete_session` function in
webdriver::server::Dispatcher which is called either when the session
has been cleanly deleted with a delete session method, or when we want
the session to be deleted. But all that method actually does is call
into WebDriverHander::delete_session, which then has to decide whether
to initiate a clean shutdown and then do any impl-specific shutdown
steps (close the connection in the case of geckodriver).

The whole setup is easier to understand if we make
webdriver::server::Dispatcher resposible for ensuring that the session
has been deleted by the time we notify the handler. We rename
`delete_session` `teardown_session` to reflect the fact that the
session may already have been deleted. This takes a single parameter,
a `SessionTeardownKind`, which indicates whether the session was
already deleted or not. In case there is a session, but it wasn't
deleted, `teardown_session` will attempt to send a `DeleteSession`
message.

On the handler side the `teardown_session` method which replaces
delete session gets a `SessionTeardownKind` that reflects whether we
ever handled a DeleteSession response, either from an explict user
request or from the implicit message sent by the dispatcher. In
geckodriver we use this to decide whether to wait for the browser to
close by itself before signalling it.

This fixes several issues; a regression in which we were waiting for
the browser to shut down when we shouldn't, and an issue where we were
sending too many delete session messages in some cases.

Differential Revision: https://phabricator.services.mozilla.com/D116886
2021-06-07 11:25:23 +00:00
James Graham b33e594d71 Bug 1713935 - Make testing/webdriver/ pass clippy, r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D116594
2021-06-02 20:29:52 +00:00
Sylvestre Ledru 34cebac865 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.4.18-stable (8157a3f 2020-07-15)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D100935
2021-01-16 15:36:39 +00:00
James Graham 9a3182dacd Bug 1684226 - Make WebDriver server a feature, r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D101184
2021-01-11 17:52:07 +00:00
Sylvestre Ledru a0d26faf8a Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,webdriver-reviewers,jgraham
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D97397
2020-11-19 12:00:28 +00:00