Bug 1759052 - Add a gv-junit webContentIsolationStrategy=0. r=nalexander

Differential Revision: https://phabricator.services.mozilla.com/D146942
This commit is contained in:
Agi Sferro 2022-05-25 17:44:51 +00:00
parent 0f1a8e152d
commit 0cf67ce1eb
4 changed files with 40 additions and 1 deletions

View file

@ -8,7 +8,7 @@ job-defaults:
geckoview-junit:
description: "Geckoview junit run"
suite: geckoview-junit
variants: ["geckoview-e10s-single", "geckoview-fission", "no-fission"]
variants: ["geckoview-e10s-single", "geckoview-fission", "fission-no-isolate", "no-fission"]
treeherder-symbol: gv-junit
loopback-video: true
target: geckoview-androidTest.apk
@ -17,6 +17,7 @@ geckoview-junit:
by-variant:
geckoview-e10s-single: ['trunk']
geckoview-fission: ['trunk']
fission-no-isolate: ['trunk']
no-fission: built-projects
default: []
tier: default

View file

@ -86,6 +86,15 @@ fission:
component: "Testing::General"
suffix: "fis"
fission-no-isolate:
description: "{description} with fission and webContentIsolationStrategy=0"
component: "Core::DOM: Content Processes"
suffix: "fis-0"
merge:
mozharness:
extra-options:
- "--web-content-isolation-strategy=0"
no-fission:
description: "{description} without fission enabled"
component: "Testing::General"

View file

@ -157,6 +157,11 @@ class JUnitTestRunner(MochitestDesktop):
# Set preferences
self.merge_base_profiles(self.options, "geckoview-junit")
if self.options.web_content_isolation_strategy is not None:
self.options.extra_prefs.append(
"fission.webContentIsolationStrategy=%s"
% self.options.web_content_isolation_strategy
)
self.options.extra_prefs.append("fission.autostart=true")
if self.options.disable_fission:
self.options.extra_prefs.pop()
@ -587,6 +592,13 @@ class JunitArgumentParser(argparse.ArgumentParser):
default=False,
help="Run the tests without Fission (site isolation) enabled.",
)
self.add_argument(
"--web-content-isolation-strategy",
type=int,
dest="web_content_isolation_strategy",
help="Strategy used to determine whether or not a particular site should load into "
"a webIsolated content process, see fission.webContentIsolationStrategy.",
)
self.add_argument(
"--repeat",
type=int,

View file

@ -122,6 +122,17 @@ class AndroidEmulatorTest(
"help": "Run without Fission enabled.",
},
],
[
["--web-content-isolation-strategy"],
{
"action": "store",
"type": "int",
"dest": "web_content_isolation_strategy",
"help": "Strategy used to determine whether or not a particular site should"
"load into a webIsolated content process, see "
"fission.webContentIsolationStrategy.",
},
],
[
["--repeat"],
{
@ -188,6 +199,7 @@ class AndroidEmulatorTest(
self.use_gles3 = True
self.disable_e10s = c.get("disable_e10s")
self.disable_fission = c.get("disable_fission")
self.web_content_isolation_strategy = c.get("web_content_isolation_strategy")
self.extra_prefs = c.get("extra_prefs")
def query_abs_dirs(self):
@ -315,6 +327,11 @@ class AndroidEmulatorTest(
if c["disable_fission"] and category not in ["gtest", "cppunittest"]:
cmd.append("--disable-fission")
if "web_content_isolation_strategy" in c:
cmd.append(
"--web-content-isolation-strategy=%s"
% c["web_content_isolation_strategy"]
)
cmd.extend(["--setpref={}".format(p) for p in self.extra_prefs])
if not (self.verify_enabled or self.per_test_coverage):