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
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
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
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
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
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
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
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
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