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

942 Коммитов

Автор SHA1 Сообщение Дата
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 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
Henrik Skupin f40fc32ec5 Bug 1713779 - [geckodriver] Also set "webdriver.log.*" preferences for logging. r=webdriver-reviewers,jdescottes
With Marionette being a part of Remote Agent now some
more code gets consolidated. As such the preferences
for logging will move soon to "webdriver.log.*". Also
"marionette.log.*", and "remote.log.*" will be removed.

This prepares geckodriver for the upcoming change on
bug 1700392.

Differential Revision: https://phabricator.services.mozilla.com/D116688
2021-06-07 10:07:04 +00:00
James Graham 029f324a5c Bug 1713935 - Make geckodriver pass clippy, r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D116595
2021-06-02 20:29:53 +00:00
James Graham c729e13078 Bug 1705770 - Refactor MarionetteHandler to avoid exposing invalid states, r=webdriver-reviewers,whimboo
Currently the MarionetteHandler class owns some data like the browser
instance which conceptually should live as long as a specific session,
not for the whole lifetime of the handler (which is basically the
lifetime of the server). This is problematic because it means we need
to consider the possibility of accessing that data after the session
is complete.

MarionetteHandler and MarionetteConnetion are also written in a way
that exposes a partially constructed state (constructing an instance
returns an object with several optional fields that are filled in
later). This means we also need to consider the possibility of these
fields being None when in fact it would always be a bug to be in that
situation.

To fix both these issues, this patch refactors the code around the
Marionette connection. All state that lives for the length of the
connection/session is put onto the MarionetteConnection
object. MarionetteHandler itself contains only the static
configuration data from GeckoDriver startup, plus an optional
connection (it would be good to also refactor this so that once a
session was started the MarionetteHandler itself would change type,
such that it's statically verifyiable that we never call things that
require a session before the session is started or after it's closed,
but that would require more changes in the WebDriver library).

In addition, constructing the Connection instance now creates the
connection and fully populates the fields.

Handling of the different browser types (local owned by GeckoDriver,
remtoe owned by GeckoDriver, and local not owned by GeckoDriver) is
moved out into the Browser enum and variants instead of being
different methods in MarionetteHandler.

When closing a connection it's necessary to call the close() method on
the browser object to ensure that it's closed (if owned by
GeckoDriver) and all state is cleaned up.

Differential Revision: https://phabricator.services.mozilla.com/D112612
2021-06-02 12:26:51 +00:00
Henrik Skupin 2c6099421a Bug 1693993 - [marionette] Move Marionette server code to /remote/marionette. r=remote-protocol-reviewers,marionette-reviewers,jdescottes,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106311
2021-05-31 17:36:06 +00:00
Alexandru Michis d30bd50d0f Backed out changeset 37f2f9ef6ef8 (bug 1693993) for containing unreviewed changes.
CLOSED TREE
2021-05-31 15:55:11 +03:00
Henrik Skupin 55d4518049 Bug 1693993 - [marionette] Move Marionette server code to /remote/marionette. r=remote-protocol-reviewers,marionette-reviewers,jdescottes,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106311
2021-05-31 08:56:32 +00:00
James Graham 673fbaf902 Bug 1686707 - Support writing prefs to a command-line provided profile, r=webdriver-reviewers,whimboo
Previously we would just ignore the command-line provided profile,
write prefs to a new profile and then use the command line provided
one. That doesn't really make sense.

Now instead we try to write the prefs to the provided profile and
restore it after the test run.

Depends on D101771

Differential Revision: https://phabricator.services.mozilla.com/D101772
2021-05-20 12:57:18 +00:00
James Graham 96cb7c79be Bug 1678044 - Fix disabling location services and new tab for geckodriver, r=webdriver-reviewers,whimboo
Depends on D99697

Differential Revision: https://phabricator.services.mozilla.com/D99698
2021-05-20 12:57:16 +00:00
Dorel Luca 1dc4a110b6 Backed out 14 changesets (bug 1686707, bug 1707876, bug 1678044) for Spidermonkey failure. CLOSED TREE
Backed out changeset 55869e7f350c (bug 1707876)
Backed out changeset bc88cd35a55d (bug 1707876)
Backed out changeset f0abe77f6bb9 (bug 1707876)
Backed out changeset 85dd729149c9 (bug 1707876)
Backed out changeset 79ced8bb0b5f (bug 1707876)
Backed out changeset f796d42723fd (bug 1707876)
Backed out changeset 9f13338b2838 (bug 1686707)
Backed out changeset baffdc510ceb (bug 1686707)
Backed out changeset d6c151fa0bba (bug 1686707)
Backed out changeset 023e75831c48 (bug 1678044)
Backed out changeset 5281b7443a89 (bug 1678044)
Backed out changeset 6aeb03df54bb (bug 1678044)
Backed out changeset 0eeb2f149770 (bug 1678044)
Backed out changeset d5f5359358fd (bug 1678044)
2021-05-19 23:59:51 +03:00
James Graham 08254c1f6a Bug 1686707 - Support writing prefs to a command-line provided profile, r=webdriver-reviewers,whimboo
Previously we would just ignore the command-line provided profile,
write prefs to a new profile and then use the command line provided
one. That doesn't really make sense.

Now instead we try to write the prefs to the provided profile and
restore it after the test run.



Depends on D101771

Differential Revision: https://phabricator.services.mozilla.com/D101772
2021-05-19 19:25:35 +00:00
James Graham a7fdba566f Bug 1678044 - Fix disabling location services and new tab for geckodriver, r=webdriver-reviewers,whimboo
Depends on D99697

Differential Revision: https://phabricator.services.mozilla.com/D99698
2021-05-19 19:25:32 +00:00
Alex Lopez 455d9a088b Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).

Differential Revision: https://phabricator.services.mozilla.com/D109650
2021-05-17 16:15:58 +00:00
Henrik Skupin aa66989830 Bug 1480107 - [geckodriver] Use "WebDriver:AcceptAlert" instead of "WebDriver:AcceptDialog". r=webdriver-reviewers,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D114148
2021-05-07 20:37:08 +00:00
Henrik Skupin 808d8e61ec Bug 1700454 - [geckodriver] Add geckodriver try preset. r=webdriver-reviewers,ahal,sparky,jdescottes DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D113465
2021-05-05 19:35:37 +00:00
Agi Sferro fec841bfe8 Bug 1698968 - Always send marionette-startup-requested r=whimboo,aklotz,webdriver-reviewers
Marionette enables itself only when --marionette is passed in. Given that
command line arguments can only be passed in using the debug configuration, it
is safe to send this event all the time.

Differential Revision: https://phabricator.services.mozilla.com/D113829
2021-04-30 20:48:37 +00:00
Andi-Bogdan Postelnicu a2692f41ac Bug 1617369 - Reformat recent rust changes with rustfmt. r=webdriver-reviewers,kvark
Updated with rustfmt 1.4.36-stable (7de6968 2021-02-07)

\# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D113295
2021-04-27 06:05:08 +00:00
Butkovits Atila 2e34e363b9 Backed out 2 changesets (bug 1696251) for causing js-bench-sm failures. CLOSED TREE
Backed out changeset 1c84c9a34575 (bug 1696251)
Backed out changeset e169193b7423 (bug 1696251)
2021-04-23 02:53:36 +03:00
Alex Lopez d1a82b8092 Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).

Differential Revision: https://phabricator.services.mozilla.com/D109650
2021-04-22 18:56:15 +00:00
imoraru 942738dd7c Backed out 9 changesets (bug 1678044, bug 1686707) for causing marionette failures at test_fission_autostart.py . CLOSED TREE
Backed out changeset ebd4998c14f6 (bug 1686707)
Backed out changeset 46cbb03eb060 (bug 1686707)
Backed out changeset 780388f3782d (bug 1686707)
Backed out changeset 0ab4fc850e9d (bug 1686707)
Backed out changeset 2f91386cca8e (bug 1678044)
Backed out changeset 708bdb00db84 (bug 1678044)
Backed out changeset 43cf7957ed78 (bug 1678044)
Backed out changeset c5914548a084 (bug 1678044)
Backed out changeset 659084e40ec2 (bug 1678044)
2021-04-22 16:21:26 +03:00
James Graham 05d36a195c Bug 1686707 - Support writing prefs to a command-line provided profile, r=webdriver-reviewers,whimboo
Previously we would just ignore the command-line provided profile,
write prefs to a new profile and then use the command line provided
one. That doesn't really make sense.

Now instead we try to write the prefs to the provided profile and
restore it after the test run.



Depends on D101771

Differential Revision: https://phabricator.services.mozilla.com/D101772
2021-04-22 12:04:09 +00:00
James Graham fc24b3ec20 Bug 1678044 - Fix disabling location services and new tab for geckodriver, r=webdriver-reviewers,whimboo
Depends on D99697

Differential Revision: https://phabricator.services.mozilla.com/D99698
2021-04-22 12:04:07 +00:00
Cosmin Sabou 785f9b8a87 Backed out changeset d4a5d8567977 (bug 1696251) for non-unified build bustages. CLOSED TREE 2021-04-19 19:43:31 +03:00
Alex Lopez 75dfe35468 Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).

Differential Revision: https://phabricator.services.mozilla.com/D109650
2021-04-19 16:15:11 +00:00
Emilio Cobos Álvarez bc04fb8a65 Bug 1704492 - Some fields in MarionetteSession are never read. r=webdriver-reviewers,whimboo
This warns with Rust nightly.

Differential Revision: https://phabricator.services.mozilla.com/D111627
2021-04-12 20:03:30 +00:00
Henrik Skupin 07e5e5eff0 Bug 1700557 - [geckodriver] Update changeset and release date for the 0.29.1 release. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D111160
2021-04-09 06:17:55 +00:00
Henrik Skupin 337d33442c Bug 1700557 - [geckodriver] Release version 0.29.1. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D111159
2021-04-08 11:38:20 +00:00
Henrik Skupin abe82c07a6 Bug 1700290 - [geckodriver] Set default intents for all known GeckoView Android packages. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D109871
2021-03-29 14:22:36 +00:00
Henrik Skupin 1a67b85b9f Bug 1700290 - [geckodriver] Use a proper default activity for known Android packages. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D109870
2021-03-29 14:22:35 +00:00
Csoregi Natalia bc8cc2fbde Backed out 2 changesets (bug 1700290) for bustage on capabilities.rs. CLOSED TREE
Backed out changeset ce2c38c1386c (bug 1700290)
Backed out changeset fce8ac201afd (bug 1700290)
2021-03-29 15:56:00 +03:00
Henrik Skupin 36efac97a6 Bug 1700290 - [geckodriver] Set default intents for all known GeckoView Android packages. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D109871
2021-03-29 12:35:00 +00:00
Henrik Skupin e65a8c3405 Bug 1700290 - [geckodriver] Use a proper default activity for known Android packages. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D109870
2021-03-29 12:34:59 +00:00
Henrik Skupin 78a8aa907b Bug 1680407 - [geckodriver] Use $EXTERNAL_STORAGE environment variable to detect sdcard location. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D109585
2021-03-25 13:34:28 +00:00
smolnar 8f2ee22900 Backed out changeset b17d8c432b6b (bug 1680407) for causing gecko browsertime failures. CLOSED TREE 2021-03-23 18:40:46 +02:00
Henrik Skupin 111a18b54e Bug 1680407 - [geckodriver] Remove --android-storage argument and always use external storage for profile folder. r=webdriver-reviewers,agi,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D109407
2021-03-23 12:46:43 +00:00
smolnar f74737684e Backed out changeset c5708498541f (bug 1680407) for causing linux build bustage in makefiles/rust.mk. CLOSED TREE 2021-03-23 14:36:54 +02:00
Henrik Skupin b14a5ba911 Bug 1680407 - [geckodriver] Remove --android-storage argument and always use external storage for profile folder. r=webdriver-reviewers,agi,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D109407
2021-03-23 12:05:19 +00:00
Ted Campbell 0004fb8b5c Bug 1697954 - Remove unused javascript.options.showInConsole prefs r=marionette-reviewers,webdriver-reviewers,mossop,remote-protocol-reviewers,whimboo
This dates back to a time before the browser console where the normal content
console could optionally show chrome code messages. Today it serves no use.

Differential Revision: https://phabricator.services.mozilla.com/D108130
2021-03-15 19:50:41 +00:00
Henrik Skupin 39a6342149 Bug 1696768 - [marionette] Don't enable "marionette.debugging.clicktostart" by default when --jsdebugger is used. r=marionette-reviewers,webdriver-reviewers,jdescottes,jgraham
Always getting a user prompt shown when debugging code in Marionette
is disturbing. Given that we usually use the "debugger;" statement
anyway, this prompt will not be useful by default.

But we should keep it to actually allow users of Marionette and
geckodriver to run a debug session without having to modify the
code first.

Differential Revision: https://phabricator.services.mozilla.com/D107428
2021-03-09 13:04:29 +00:00
David Major 99e50b5596 Bug 1690551 - Remove unnecessary semicolons in testing/geckodriver/src/command.rs r=webdriver-reviewers,jgraham
Rust 1.51 nightly emits warnings-as-errors about them.

Differential Revision: https://phabricator.services.mozilla.com/D103899
2021-02-03 14:30:48 +00:00
Henrik Skupin 206eecdc83 Bug 1668243 - [geckodriver] Update changeset for the 0.29.0 release. r=webdriver-reviewers,jgraham
DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D101730
2021-01-14 11:03:12 +00:00
Henrik Skupin b0aa196847 Bug 1668243 - [geckodriver] Release version 0.29.0. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D101592
2021-01-13 17:47:31 +00:00
Henrik Skupin 8f891b15aa Bug 1638962 - [geckodriver] Remove broken geckodriver-test mach command. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D100901
2021-01-06 12:36:17 +00:00
Henrik Skupin f5dad28ab6 Bug 1680114 - [geckodriver] Set fission.autostart=false when moz:debuggerAddress is requested. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D98439
2020-12-04 09:53:26 +00:00
Razvan Maries 569fecb143 Backed out 2 changesets (bug 1680114) for perma failures on debugger_address.py. CLOSED TREE
Backed out changeset ac01524b0fbd (bug 1680114)
Backed out changeset b3be38cb8fe6 (bug 1680114)
2020-12-03 22:58:53 +02:00
Henrik Skupin 2cafafe80b Bug 1680114 - [geckodriver] Set fission.autostart=false when moz:debuggerAddress is requested. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D98439
2020-12-03 13:44:34 +00:00
Henrik Skupin 6a7feb99ae Bug 1679376 - [geckodriver] Fix usage of hyphens in geckodriver's docs for command line flags. r=webdriver-reviewers,jgraham DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D97989
2020-11-26 10:50:47 +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 0dee1b74e8 Bug 1676513 - Fix clippy warnings r=emilio,webdriver-reviewers,whimboo,rhunt
Depends on D96634

Differential Revision: https://phabricator.services.mozilla.com/D96636
2020-11-17 12:02:22 +00:00