зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1669169 - [marionette] Add --disable-actors command line argument to force usage of deprecated framescripts instead of actors. r=marionette-reviewers,jdescottes,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D96465
This commit is contained in:
Родитель
87e9402504
Коммит
76416a2e1f
|
@ -421,6 +421,13 @@ class BaseMarionetteArguments(ArgumentParser):
|
|||
help="Enable python post-mortem debugger when a test fails."
|
||||
" Pass in the debugger you want to use, eg pdb or ipdb.",
|
||||
)
|
||||
self.add_argument(
|
||||
"--disable-actors",
|
||||
action="store_true",
|
||||
dest="disable_actors",
|
||||
default=False,
|
||||
help="Disable the usage of JSWindowActors in Marionette.",
|
||||
)
|
||||
self.add_argument(
|
||||
"--enable-fission",
|
||||
action="store_true",
|
||||
|
@ -650,8 +657,9 @@ class BaseMarionetteTestRunner(object):
|
|||
verbose=0,
|
||||
emulator=False,
|
||||
headless=False,
|
||||
enable_webrender=False,
|
||||
disable_actors=False,
|
||||
enable_fission=False,
|
||||
enable_webrender=False,
|
||||
**kwargs
|
||||
):
|
||||
self._appName = None
|
||||
|
@ -697,6 +705,14 @@ class BaseMarionetteTestRunner(object):
|
|||
self.headless = headless
|
||||
self.enable_webrender = enable_webrender
|
||||
|
||||
self.disable_actors = disable_actors
|
||||
if self.disable_actors:
|
||||
self.prefs.update(
|
||||
{
|
||||
"marionette.actors.enabled": False,
|
||||
}
|
||||
)
|
||||
|
||||
self.enable_fission = enable_fission
|
||||
if self.enable_fission:
|
||||
self.prefs.update(
|
||||
|
@ -1138,6 +1154,7 @@ class BaseMarionetteTestRunner(object):
|
|||
"appname": self.appName,
|
||||
"manage_instance": self.marionette.instance is not None,
|
||||
"headless": self.headless,
|
||||
"actors": not self.disable_actors,
|
||||
"webrender": self.enable_webrender,
|
||||
}
|
||||
)
|
||||
|
|
|
@ -372,9 +372,17 @@ def test_manifest_basic_args(mock_runner, manifest, monkeypatch):
|
|||
assert kwargs["exists"] is False
|
||||
assert kwargs["disabled"] is True
|
||||
assert kwargs["appname"] == "fake_app"
|
||||
assert kwargs["actors"] is True
|
||||
assert "mozinfo_key" in kwargs and kwargs["mozinfo_key"] == "mozinfo_val"
|
||||
|
||||
|
||||
def test_manifest_actors_disabled(mock_runner, manifest, monkeypatch):
|
||||
kwargs = get_kwargs_passed_to_manifest(
|
||||
mock_runner, manifest, monkeypatch, disable_actors=True
|
||||
)
|
||||
assert kwargs["actors"] is False
|
||||
|
||||
|
||||
@pytest.mark.parametrize("test_tags", (None, ["tag", "tag2"]))
|
||||
def test_manifest_with_test_tags(mock_runner, manifest, monkeypatch, test_tags):
|
||||
kwargs = get_kwargs_passed_to_manifest(
|
||||
|
|
|
@ -144,6 +144,15 @@ class MarionetteTest(TestingMixin, MercurialScript, TransferMixin, CodeCoverageM
|
|||
"help": "Permits a software GL implementation (such as LLVMPipe) to use the GL compositor.", # NOQA: E501
|
||||
},
|
||||
],
|
||||
[
|
||||
["--disable-actors"],
|
||||
{
|
||||
"action": "store_true",
|
||||
"dest": "disable_actors",
|
||||
"default": False,
|
||||
"help": "Disable the usage of JSWindowActors in Marionette.",
|
||||
},
|
||||
],
|
||||
[
|
||||
["--enable-webrender"],
|
||||
{
|
||||
|
@ -338,6 +347,9 @@ class MarionetteTest(TestingMixin, MercurialScript, TransferMixin, CodeCoverageM
|
|||
if self.config.get("app_arg"):
|
||||
config_fmt_args["app_arg"] = self.config["app_arg"]
|
||||
|
||||
if self.config["disable_actors"]:
|
||||
cmd.append("--disable-actors")
|
||||
|
||||
if self.config["enable_webrender"]:
|
||||
cmd.append("--enable-webrender")
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче