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
This commit is contained in:
Henrik Skupin 2021-05-31 17:36:06 +00:00
parent 5ceb7158fe
commit 2c6099421a
130 changed files with 61 additions and 48 deletions

View file

@ -155,6 +155,7 @@ python/
# These are (mainly) imported code that we don't want to lint to make imports easier. # These are (mainly) imported code that we don't want to lint to make imports easier.
remote/cdp/Protocol.jsm remote/cdp/Protocol.jsm
remote/cdp/test/browser/chrome-remote-interface.js remote/cdp/test/browser/chrome-remote-interface.js
remote/marionette/atom.js
# services/ exclusions # services/ exclusions
@ -170,7 +171,6 @@ servo/
# Test files that we don't want to lint (preprocessed, minified etc) # Test files that we don't want to lint (preprocessed, minified etc)
testing/condprofile/condprof/tests/profile testing/condprofile/condprof/tests/profile
testing/marionette/atom.js
testing/mozbase/mozprofile/tests/files/prefs_with_comments.js testing/mozbase/mozprofile/tests/files/prefs_with_comments.js
testing/talos/talos/scripts/jszip.min.js testing/talos/talos/scripts/jszip.min.js
testing/talos/talos/startup_test/sessionrestore/profile/sessionstore.js testing/talos/talos/startup_test/sessionrestore/profile/sessionstore.js

View file

@ -55,7 +55,7 @@ extensions = [
js_source_path = [ js_source_path = [
"../browser/components/extensions", "../browser/components/extensions",
"../browser/components/uitour", "../browser/components/uitour",
"../testing/marionette", "../remote/marionette",
"../toolkit/components/extensions", "../toolkit/components/extensions",
"../toolkit/components/extensions/parent", "../toolkit/components/extensions/parent",
"../toolkit/components/featuregates", "../toolkit/components/featuregates",

View file

@ -6,7 +6,21 @@ DIRS += [
"rust", "rust",
] ]
EXTRA_COMPONENTS += [
"marionette.js",
"marionette.manifest",
]
XPIDL_MODULE = "remote" XPIDL_MODULE = "remote"
XPIDL_SOURCES += ["nsIRemoteAgent.idl"]
XPIDL_SOURCES += [
"nsIMarionette.idl",
"nsIRemoteAgent.idl",
]
XPCOM_MANIFESTS += ["components.conf"] XPCOM_MANIFESTS += ["components.conf"]
with Files("marionette.*"):
BUG_COMPONENT = ("Testing", "Marionette")
with Files("nsIMarionette.idl"):
BUG_COMPONENT = ("Testing", "Marionette")

View file

@ -11,10 +11,10 @@ Marionette [ ˌmarɪəˈnɛt] is
Marionette provides interfaces for interacting with both the internal Marionette provides interfaces for interacting with both the internal
JavaScript runtime and UI elements of Gecko-based browsers, such JavaScript runtime and UI elements of Gecko-based browsers, such
as Firefox and Fennec. It can control both the chrome- and content as Firefox on desktop and mobile. It can control both the chrome- and content
documents, giving a high level of control and ability to replicate, documents, giving a high level of control and ability to replicate,
or emulate, user interaction. or emulate, user interaction.
Head on to the Marionette documentation to find out more: Head on to the Marionette documentation to find out more:
https://firefox-source-docs.mozilla.org/testing/marionette/marionette/ https://firefox-source-docs.mozilla.org/testing/marionette/

View file

@ -14,7 +14,7 @@ For the overall Marionette project, a few rough rules are:
* Code is mutable and not written in stone. Nothing that * Code is mutable and not written in stone. Nothing that
is checked in is sacred and we encourage change to make is checked in is sacred and we encourage change to make
testing/marionette a pleasant ecosystem to work in. remote/marionette a pleasant ecosystem to work in.
JavaScript JavaScript
@ -166,14 +166,14 @@ to make this happen!
The practical details of working on the Marionette code is outlined The practical details of working on the Marionette code is outlined
in [CONTRIBUTING.md], but generally you do not have to re-build in [CONTRIBUTING.md], but generally you do not have to re-build
Firefox when changing code. Any change to testing/marionette/*.js Firefox when changing code. Any change to remote/marionette/*.js
will be picked up on restarting Firefox. The only notable exception will be picked up on restarting Firefox. The only notable exception
is testing/marionette/components/marionette.js, which does require is remote/components/marionette.js, which does require
a re-build. a re-build.
[XPCOM]: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM [XPCOM]: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM
[strict mode]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode [strict mode]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode
[our own specialisations]: https://searchfox.org/mozilla-central/source/testing/marionette/.eslintrc.js [our own specialisations]: https://searchfox.org/mozilla-central/source/remote/marionette/.eslintrc.js
[linter]: #linting [linter]: #linting
[copying header]: https://www.mozilla.org/en-US/MPL/headers/ [copying header]: https://www.mozilla.org/en-US/MPL/headers/
[public domain]: https://creativecommons.org/publicdomain/zero/1.0/ [public domain]: https://creativecommons.org/publicdomain/zero/1.0/
@ -190,7 +190,7 @@ TODO
Documentation Documentation
------------- -------------
We keep our documentation in-tree under [testing/marionette/doc] We keep our documentation in-tree under [remote/marionette/doc]
and [testing/geckodriver/doc]. Updates and minor changes to and [testing/geckodriver/doc]. Updates and minor changes to
documentation should ideally not be scrutinised to the same degree documentation should ideally not be scrutinised to the same degree
as code changes to encourage frequent updates so that the documentation as code changes to encourage frequent updates so that the documentation
@ -207,16 +207,17 @@ These include public functions—or command implementations—on
the `GeckoDriver` class, as well as all exported symbols from the `GeckoDriver` class, as well as all exported symbols from
other modules. Documentation for non-exported symbols is not required. other modules. Documentation for non-exported symbols is not required.
The API documentation can be regenerated to [testing/marionette/doc/api] The API documentation can be regenerated to [remote/marionette/doc/internals]
so: so:
The API documentation uses [jsdoc] and is generated to <https://firefox-source-docs.mozilla.org/testing/marionette/marionette/internals> on Taskcluster. You may also build the documentation locally: The API documentation uses [jsdoc] and is generated to <https://firefox-source-docs.mozilla.org/testing/marionette/internals> on Taskcluster. You may also build the documentation locally:
% ./mach doc % ./mach doc
[Mozilla eslint rules]: https://searchfox.org/mozilla-central/source/.eslintrc.js [Mozilla eslint rules]: https://searchfox.org/mozilla-central/source/.eslintrc.js
[remote/marionette/doc]: https://searchfox.org/mozilla-central/source/remote/marionette/doc
[remote/marionette/doc/internals]: https://searchfox.org/mozilla-central/source/remote/marionette/doc/internals
[testing/geckodriver/doc]: https://searchfox.org/mozilla-central/source/testing/geckodriver/doc [testing/geckodriver/doc]: https://searchfox.org/mozilla-central/source/testing/geckodriver/doc
[testing/marionette/doc]: https://searchfox.org/mozilla-central/source/testing/marionette/doc
[jsdoc]: http://usejsdoc.org/ [jsdoc]: http://usejsdoc.org/
@ -229,13 +230,13 @@ which harmonises the output from [eslint] and [flake8].
To run the linter with a sensible output: To run the linter with a sensible output:
% ./mach lint -funix testing/marionette % ./mach lint -funix remote/marionette
For certain classes of style violations the eslint linter has For certain classes of style violations the eslint linter has
an automatic mode for fixing and formatting your code. This is an automatic mode for fixing and formatting your code. This is
particularly useful to keep to whitespace and indentation rules: particularly useful to keep to whitespace and indentation rules:
% ./mach eslint --fix testing/marionette % ./mach eslint --fix remote/marionette
The linter is also run as a try job (shorthand `ES`) which means The linter is also run as a try job (shorthand `ES`) which means
any style violations will automatically block a patch from landing any style violations will automatically block a patch from landing

View file

@ -56,7 +56,7 @@ code in our [code style document], which we highly recommend you read.
[ask questions]: ./index.html#communication [ask questions]: ./index.html#communication
[reach out to us]: ./index.html#communication [reach out to us]: ./index.html#communication
[mozilla-central]: https://searchfox.org/mozilla-central/source/testing/marionette/ [mozilla-central]: https://searchfox.org/mozilla-central/source/remote/marionette/
[good first bugs]: https://codetribute.mozilla.org/projects/automation [good first bugs]: https://codetribute.mozilla.org/projects/automation
[code style document]: CodeStyle.html [code style document]: CodeStyle.html

View file

@ -64,7 +64,8 @@ your patches are laid out in [Patches.md](Patches.html).
Resources Resources
--------- ---------
* Search Mozilla's code repositories with [searchfox]. * Search Mozilla's code repository with searchfox to find the [code for
Marionette] and the [Marionette client/harness].
* Another [guide for new contributors]. It has not been updated in a long * Another [guide for new contributors]. It has not been updated in a long
time but it's a good general resource if you ever get stuck on something. time but it's a good general resource if you ever get stuck on something.
@ -81,7 +82,8 @@ Resources
* If you'd rather use git instead of hg, see [git workflow for * If you'd rather use git instead of hg, see [git workflow for
Gecko development] and/or [this blog post by :ato]. Gecko development] and/or [this blog post by :ato].
[searchfox]: https://searchfox.org/mozilla-central/source/testing/marionette/ [code for Marionette]: https://searchfox.org/mozilla-central/source/remote/marionette/
[Marionette client/harness]: https://searchfox.org/mozilla-central/source/testing/marionette/
[guide for new contributors]: https://ateam-bootcamp.readthedocs.org/en/latest/guide/index.html#new-contributor-guide [guide for new contributors]: https://ateam-bootcamp.readthedocs.org/en/latest/guide/index.html#new-contributor-guide
[Mercurial for Mozillians]: https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/index.html [Mercurial for Mozillians]: https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/index.html
[guide]: https://gist.github.com/mjzffr/d2adef328a416081f543 [guide]: https://gist.github.com/mjzffr/d2adef328a416081f543

View file

@ -17,7 +17,7 @@ To use one of those atoms Javascript modules will have to import
[Selenium atoms]: https://github.com/SeleniumHQ/selenium/tree/master/javascript/webdriver/atoms [Selenium atoms]: https://github.com/SeleniumHQ/selenium/tree/master/javascript/webdriver/atoms
[WebDriver specification]: https://w3c.github.io/webdriver/webdriver-spec.html [WebDriver specification]: https://w3c.github.io/webdriver/webdriver-spec.html
[atom.js]: https://searchfox.org/mozilla-central/source/testing/marionette/atom.js [atom.js]: https://searchfox.org/mozilla-central/source/remote/marionette/atom.js
Update required Selenium atoms Update required Selenium atoms

View file

@ -23,14 +23,14 @@ xpcshell unit tests
------------------- -------------------
Marionette has a set of [xpcshell] unit tests located in Marionette has a set of [xpcshell] unit tests located in
_testing/marionette/test/unit. These can be run this way: _remote/marionette/test/xpcshell. These can be run this way:
% ./mach test testing/marionette/test/unit % ./mach test remote/marionette/test/unit
Because tests are run in parallel and xpcshell itself is quite Because tests are run in parallel and xpcshell itself is quite
chatty, it can sometimes be useful to run the tests sequentially: chatty, it can sometimes be useful to run the tests sequentially:
% ./mach test --sequential testing/marionette/test/unit/test_error.js % ./mach test --sequential remote/marionette/test/xpcshell/test_error.js
These unit tests run as part of the `X` jobs on Treeherder. These unit tests run as part of the `X` jobs on Treeherder.

View file

@ -39,7 +39,7 @@ marionette.jar:
content/prefs.js (prefs.js) content/prefs.js (prefs.js)
content/print.js (print.js) content/print.js (print.js)
content/reftest.js (reftest.js) content/reftest.js (reftest.js)
content/reftest.xhtml (reftest.xhtml) content/reftest.xhtml (chrome/reftest.xhtml)
content/reftest-content.js (reftest-content.js) content/reftest-content.js (reftest-content.js)
content/server.js (server.js) content/server.js (server.js)
content/session.js (session.js) content/session.js (session.js)

View file

@ -0,0 +1,15 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ["jar.mn"]
XPCSHELL_TESTS_MANIFESTS += ["test/xpcshell/xpcshell.ini"]
with Files("**"):
BUG_COMPONENT = ("Testing", "Marionette")
SPHINX_TREES["/testing/marionette"] = "doc"
with Files("doc/**"):
SCHEDULES.exclusive = ["docs"]

Some files were not shown because too many files have changed in this diff Show more