gecko-dev/testing/marionette
Ricky Stewart 31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
..
actors Bug 1654609 - [marionette] Port WebDriver:GetElementProperty and WebDriver:GetElementAttribute to JSWindowActor. r=marionette-reviewers,maja_zf 2020-07-23 14:29:21 +00:00
chrome Bug 1644863 - fix trailing whitespace in cross-tree tests, r=emilio,marionette-reviewers,whimboo 2020-06-17 22:45:31 +00:00
client Bug 1654537 - Release marionette_driver 3.1.0 r=marionette-reviewers,whimboo 2020-07-22 14:41:03 +00:00
components Bug 1649554: Part 1 - Move deprecated component registration helpers out of XPCOMUtils. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,whimboo,twisniewski 2020-07-10 23:58:30 +00:00
doc
harness Bug 1486004 - Part 9 - Update marionette harness requirements to support unrooted android devices using mozdevice 4.0.0, ? r=marionette-reviewers,whimboo 2020-07-17 20:48:28 +00:00
test Bug 1612831 - [marionette] Do check for load event expected in parent process. r=marionette-reviewers,maja_zf 2020-07-20 08:26:51 +00:00
.eslintrc.js
README
accessibility.js
action.js Bug 1417955 - Ensure we get the correct keyCode for a space character, r=marionette-reviewers,maja_zf 2020-03-25 19:36:54 +00:00
addon.js
assert.js Bug 1606439 - [marionette] Add sameSite cookie support. r=whimboo,marionette-reviewers 2020-06-12 21:11:21 +00:00
atom.js
browser.js Bug 1653281 - [marionette] WebDriver:NewWindow for a new tab has to wait for the framescript to be registered. r=marionette-reviewers,maja_zf 2020-07-17 16:19:17 +00:00
capabilities.js
capture.js
cert.js
cookie.js Bug 1651618 - Use cookie 'SameSite' attribute with capital 'S' everywhere, r=flod,fluent-reviewers,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,whimboo,sparky 2020-07-09 20:40:15 +00:00
dom.js Bug 1631358 - remove CPOW handling in marionette r=marionette-reviewers,whimboo 2020-04-21 14:06:08 +00:00
driver.js Bug 1654609 - [marionette] Port WebDriver:GetElementProperty and WebDriver:GetElementAttribute to JSWindowActor. r=marionette-reviewers,maja_zf 2020-07-23 14:29:21 +00:00
element.js Bug 1632092 - Rename all XUL namespace variables to XUL_NS. r=Gijs,marionette-reviewers,whimboo 2020-04-24 09:23:52 +00:00
error.js
evaluate.js
event.js Bug 1417955 - Ensure we get the correct keyCode for a space character, r=marionette-reviewers,maja_zf 2020-03-25 19:36:54 +00:00
format.js
interaction.js
jar.mn Bug 1653911 - [marionette] Land minimal implementation of JSWindowActor pair. r=marionette-reviewers,maja_zf 2020-07-21 05:48:14 +00:00
l10n.js
legacyaction.js
listener.js Bug 1651297 - [marionette] Improve debug logging for paintComplete in reftests. r=marionette-reviewers,jgraham,maja_zf 2020-07-30 10:00:19 +00:00
log.js
mach_commands.py Bug 1623965 - Improve error message when binary not found while testing. r=glandium,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,Bebe,whimboo 2020-04-21 11:58:04 +00:00
mach_test_package_commands.py Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj 2020-08-07 18:24:59 +00:00
message.js
modal.js
moz.build
navigate.js Bug 1612831 - [marionette] Do check for load event expected in parent process. r=marionette-reviewers,maja_zf 2020-07-20 08:26:51 +00:00
packets.js
prefs.js Bug 1654453 - [marionette] Conditionally enable usage of JSWindowActor. r=marionette-reviewers,maja_zf 2020-07-23 13:50:17 +00:00
print.js Bug 1652270. Convert nsFrameLoader::Print to return a Promise. r=farre,remote-protocol-reviewers,marionette-reviewers,jgraham,whimboo,mixedpuppy 2020-07-22 23:17:45 +00:00
proxy.js
reftest.js Backed out 10 changesets (bug 1589102) for failure at browser_saveHeapSnapshot_e10s_01.js CLOSED TREE 2020-08-05 21:47:50 +03:00
reftest.xhtml
server.js
stream-utils.js Backed out 2 changesets (bug 1625500) for multiple failures on a CLOSED TREE 2020-04-17 15:36:05 +03:00
sync.js Bug 1619481 - [marionette] IdlePromise should not hang when underlying window gets closed. r=marionette-reviewers,maja_zf 2020-04-27 14:26:19 +00:00
transport.js
wm.js

README

Этот файл содержит неоднозначные символы Юникода!

Этот файл содержит неоднозначные символы Юникода, которые могут быть перепутаны с другими в текущей локали. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы подсветить эти символы.

Marionette [ ˌmarɪəˈnɛt] is

  * a puppet worked by strings: the bird bobs up and down like
    a marionette;

  * a person who is easily manipulated or controlled: many officers
    dismissed him as the mayors marionette;

  * the remote protocol that lets out-of-process programs communicate
    with, instrument, and control Gecko-based browsers.

Marionette provides interfaces for interacting with both the internal
JavaScript runtime and UI elements of Gecko-based browsers, such
as Firefox and Fennec.  It can control both the chrome- and content
documents, giving a high level of control and ability to replicate,
or emulate, user interaction.

Head on to the Marionette documentation to find out more:

	https://firefox-source-docs.mozilla.org/testing/marionette/marionette/