bug 1603078: remote: add --enable-fission to "./mach puppeteer-test" r=remote-protocol-reviewers,whimboo

The "./mach puppeteer-test" command now takes a new flag,
--enable-fission, which will set the fission.autostart preference to true.

Differential Revision: https://phabricator.services.mozilla.com/D58512

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Tolfsen 2020-01-06 09:55:01 +00:00
Родитель cfb4f745d1
Коммит b1d2305ed8
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -248,6 +248,9 @@ class PuppeteerTest(MachCommandBase):
@CommandArgument("--binary",
type=str,
help="Path to browser binary. Defaults to local Firefox build.")
@CommandArgument("--enable-fission",
action="store_true",
help="Enable Fission (site isolation) in Gecko.")
@CommandArgument("-z", "--headless",
action="store_true",
help="Run browser in headless mode.")
@ -267,7 +270,7 @@ class PuppeteerTest(MachCommandBase):
metavar="<N>",
help="Optionally run tests in parallel.")
@CommandArgument("tests", nargs="*")
def puppeteer_test(self, binary=None, headless=False, extra_prefs=None,
def puppeteer_test(self, binary=None, enable_fission=False, headless=False, extra_prefs=None,
extra_options=None, jobs=1, tests=None, product="firefox", **kwargs):
# moztest calls this programmatically with test objects or manifests
if "test_objects" in kwargs and tests is not None:
@ -295,6 +298,11 @@ class PuppeteerTest(MachCommandBase):
exit(EX_USAGE, "syntax error in --setopt={}".format(s))
options[kv[0]] = kv[1].strip()
if enable_fission:
prefs.update({"fission.autostart": True,
"dom.serviceWorkers.parent_intercept": True,
"browser.tabs.documentchannel": True})
self.install_puppeteer(product)
params = {"binary": binary,