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

331 Коммитов

Автор SHA1 Сообщение Дата
James Graham 158ea02bba 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 871fb42930 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 d844b7a2dd 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 b72f22094f 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 6d2acef1e8 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 0e4d383ed3 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 0427ce5318 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
Henrik Skupin 9d8a929736 Bug 1700557 - [webdriver] Release version 0.43.1. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D111158
2021-04-08 11:38:20 +00:00
Sylvestre Ledru d4d28b7263 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
Henrik Skupin bd6a1fdab2 Bug 1668243 - [webdriver] Release version 0.43.0. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D101591
2021-01-13 16:42:09 +00:00
James Graham b03c8f7cf5 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 691f01a663 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
Sylvestre Ledru c0f6fe8caf Bug 1562642 - Add missing license headers r=mhoye,marionette-reviewers,webdriver-reviewers,perftest-reviewers,tarek
Differential Revision: https://phabricator.services.mozilla.com/D97138
2020-11-17 02:06:54 +00:00
Henrik Skupin 9bcfe67ea4 Bug 1649094 - [webdriver] Release version 0.42.0. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D95072
2020-11-03 03:51:29 +00:00
James Graham ff671615a2 Bug 1656014 - Remove PartialEq bound on WebDriverExtensionCommand, r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D87860
2020-08-21 13:39:29 +00:00
James Graham ec4755c492 Bug 1648964 - Return proper error when the server starts, r=freddyb,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D81574
2020-07-27 22:05:20 +00:00
James Graham b1f117d772 Bug 1648964 - Improve Origin header handling, r=freddyb,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D81534
2020-07-27 22:05:18 +00:00
James Graham 0537cb64fd Bug 1648964 - Improve content-type header handling, r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D81533
2020-07-27 22:05:17 +00:00
James Graham f49a6ca609 Bug 1648964 - Always check for Firefox when creating WebDriver session, r=webdriver-reviewers,whimboo,maja_zf
When creating a Firefox session with a custom binary, ensure that it
either has a valid application ini file or a valid version string when
run with --version.

Differential Revision: https://phabricator.services.mozilla.com/D81531
2020-07-28 12:51:04 +00:00
Brindusan Cristian 2168dfaac8 Backed out 5 changesets (bug 1648964) for android browsertime failures. CLOSED TREE
Backed out changeset 3923416a7d52 (bug 1648964)
Backed out changeset 804efa2fb56a (bug 1648964)
Backed out changeset b6f952ac6b52 (bug 1648964)
Backed out changeset 9eac3ed0ff02 (bug 1648964)
Backed out changeset fbf341f98824 (bug 1648964)
2020-07-27 21:20:12 +03:00
Henrik Skupin 607ff41a86 Bug 1584911 - [webdriver] Release version 0.41.0. r=webdriver-reviewers,jgraham
Depends on D81905

Differential Revision: https://phabricator.services.mozilla.com/D81906
2020-07-02 08:24:30 +00:00
James Graham 379015d37e Bug 1648964 - Return proper error when the server starts, r=freddyb,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D81574
2020-07-27 13:10:47 +00:00
James Graham 9389138d03 Bug 1648964 - Improve Origin header handling, r=freddyb,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D81534
2020-07-27 13:10:43 +00:00
James Graham 424c9f55f4 Bug 1648964 - Improve content-type header handling, r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D81533
2020-07-27 13:10:33 +00:00
James Graham 64e5f25d4c Bug 1648964 - Always check for Firefox when creating WebDriver session, r=webdriver-reviewers,whimboo
When creating a Firefox session with a custom binary, ensure that it
either has a valid application ini file or a valid version string when
run with --version.

Differential Revision: https://phabricator.services.mozilla.com/D81531
2020-07-27 13:10:20 +00:00
Peter Major 7375852318 Bug 1606439 - [geckodriver] Add sameSite cookie support. r=whimboo,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D62500
2020-06-12 21:11:44 +00:00
James Graham d0cfe96cae Bug 1643354 - Fix type parameter in unit test, r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D78683
2020-06-08 14:29:49 +00:00
Sylvestre Ledru f69840fd80 Bug 1617369 - Reformat recent rust changes with rustfmt r=webdriver-reviewers,whimboo
# ignore-this-changeset

Depends on D76451

Differential Revision: https://phabricator.services.mozilla.com/D76663
2020-05-25 09:07:45 +00:00
David Burns d5d4abf328 Bug 1639230: Remove vendor prefix for printing with webdriver r=jgraham,webdriver-reviewers
This removes the vendor prefix for printing to PDF as it has landed in
the WebDriver specification[1]. It moves the wpt to the main test suite.

[1] https://w3c.github.io/webdriver/#print

Differential Revision: https://phabricator.services.mozilla.com/D76294
2020-05-23 08:48:33 +00:00
Sylvestre Ledru 7f26dcf1b6 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Done with:
./mach lint -l rustfmt --fix
with
rustfmt 1.4.12-stable (a828ffe 2020-03-11)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D72527
2020-04-25 21:21:32 +00:00
Bastien Orivel 8052061256 Bug 1606281 - Part 1: Update warp to 0.2. r=jgraham,webdriver-reviewers
Pretty straightforward update. This duplicates the tokio stack because
audioipc hasn't been updated yet.  (https://github.com/djg/audioipc-2/issues/97)

Differential Revision: https://phabricator.services.mozilla.com/D71462
2020-04-20 15:27:31 +00:00
Kartikaya Gupta 815a0c36ff Bug 1622256 - Remove usage of deprecated Error::description. r=jgraham,webdriver-reviewers
Depends on D66766

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

--HG--
extra : moz-landing-system : lando
2020-03-14 04:21:22 +00:00
Henrik Skupin 95882ede80 Bug 1619500 - [marionette, geckodriver] Replace references of IRC with Matrix.
DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2020-03-03 07:05:02 +00:00
James Graham 3943d0e86b Bug 1613975 - Mark webdriver crate as Rust 2018, r=whimboo,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D62212

--HG--
extra : moz-landing-system : lando
2020-02-10 14:53:43 +00:00
Andreas Tolfsen f3071e8691 bug 1585964: webdriver: drop regex dependency; r=webdriver-reviewers,jgraham
webdriver depends on the regex crate for unit testing which adds
significant overhead building the crate.  We could depend on
serde_json::from_value() instead, following the same pattern set
forth in the marionette crate.

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

--HG--
extra : moz-landing-system : lando
2019-10-07 12:53:38 +00:00
Andreas Tolfsen 0579256665 bug 1520585: webdriver: release 0.40.2; r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D44656

--HG--
extra : moz-landing-system : lando
2019-09-09 10:59:27 +00:00
David Heiberg a077d6cd01 Bug 1577503 - Replace filter_map(p).next() with find(p) r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D44973

--HG--
extra : moz-landing-system : lando
2019-09-06 12:53:08 +00:00
David Heiberg 22491909e6 Bug 1577503 - Automatic Clippy fixes r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D44972

--HG--
extra : moz-landing-system : lando
2019-09-06 12:07:20 +00:00
David Heiberg c4e8cd9c12 Bug 1577503 - Use lossless conversions instead of casting r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D44971

--HG--
extra : moz-landing-system : lando
2019-09-06 12:07:05 +00:00
David Heiberg 2fcde7c8fe Bug 1577503 - Allow clippy double options r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D44970

--HG--
extra : moz-landing-system : lando
2019-09-06 12:06:56 +00:00
David Heiberg b0275fcbf9 Bug 1577503 - Remove redundant static lifetimes r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D44969

--HG--
extra : moz-landing-system : lando
2019-09-06 12:06:53 +00:00
Bastien Orivel a5f69db222 Bug 1576450 - Update cookie to 0.12 in webdriver. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D43354

--HG--
extra : moz-landing-system : lando
2019-08-25 23:22:11 +00:00
Simon Sapin c65755ac41 Bug 1568540 - Update the url crate to 2.0 r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D42364

--HG--
extra : moz-landing-system : lando
2019-08-17 16:26:27 +00:00
James Graham d289d43116 Bug 1573414 - Make geckodriver, webdriver and mozbase #![forbid(unsafe_code)], r=ato
We don't expect to use any unsafe and doing this helps static analysis tools
determine that the library is low risk from the point of view of memory unsafety,
and makes it less likely someone will add in some unsafe code in the future without
appropriate care.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 13:27:51 +00:00
Andreas Tolfsen 91b38964c8 bug 1572397: webdriver: release v0.40.0; r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D41185

--HG--
extra : moz-landing-system : lando
2019-08-08 15:35:42 +00:00
georgeroman 0aad00a99a Bug 1568327 - [geckodriver] Make ActionSequence's id field mandatory. r=whimboo
Make sure that deserializing an ActionSequence which misses the "id" field raises an "InvalidArgument" error.

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

--HG--
extra : moz-landing-system : lando
2019-08-01 10:26:50 +00:00
Brindusan Cristian 7e24c23303 Backed out changeset facd6af4e16c (bug 1568327) for wpt failures at perform_actions/key.py. CLOSED TREE 2019-07-31 13:11:03 +03:00
georgeroman 890305ff93 Bug 1568327 - Make ActionSequence's id field mandatory r=whimboo
Change ActionSequence's id field from Option<String> to String

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

--HG--
extra : moz-landing-system : lando
2019-07-31 06:55:16 +00:00
Andreas Tolfsen c757d8208f bug 1569140: webdriver: lint; r=webdriver-reviewers,automatedtester
Bug 1568889 enabled the rustfmt lint checks in continuous integration,
and while they did not cause any errors, this is a follow-up patch
to fix the non-fatal warnings.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 12:00:31 +00:00
georgeroman ccc3d023a4 Bug 1569466 - Implement Deserialize for ErrorStatus. r=ato
Implement Deserialize for ErrorStatus

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

--HG--
extra : moz-landing-system : lando
2019-07-29 09:35:15 +00:00