Add support for the prefs configuration option in xpcshell test manifests
Categories
(Testing :: XPCShell Harness, enhancement)
Tracking
(firefox78 fixed)
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: rpl, Assigned: rpl)
References
Details
Attachments
(2 files)
In mochitest ini manifest files we can already specify some preferences to be set before any of the tests starts using the prefs
configuration option.
On the contrary the xpcshell ini manifest files do not currently support this feature, and the prefs
configuration options are being silently ignored (1).
Be able to use prefs
in the tests ini manifest file is a feature particularly helpful for tests that depends on StaticPrefs defined as mirror: once
, because they are loaded once (eg. when the profile-do-change topic is being notified by the xpcshell test harness) and then their value as visible from the C++ code is never changed again and so some tests cannot be achieved by flipping them at runtime without restarting the process (2).
Besides being helpful to test StaticPrefs defined as "mirror: once", this can also be useful for any kind of prefs.
(1:) e.g. in Bug 1614966 some prefs has been moved to the xpcshell test manifest, but we didn't notice that they were not actually being set until some days ago, Bug 1634201 has been filed to remove them but another option would be to leave them and look into fixing this issue instead
(2): e.g. in Bug 1609920 I had this issue and I have currently rewrote the tests as mochitest-browser, but once we add more tests it would be better to be able to write them as xpcshell test and reduce the amount of time needed to run all of them.
Assignee | ||
Comment 1•4 years ago
|
||
TODO: once we agreed on the preferred approach changes similar to the one applied to
runxpcshelltest.py in this patch should also be applied to remotexpcshelltests.py.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D73748
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/a6927af759dc Add support for the prefs configuration option in xpcshell test manifests. r=gbrown https://hg.mozilla.org/integration/autoland/rev/4702329bb197 Add test for prefs manifest option in xpcshell selftest.py. r=gbrown
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a6927af759dc
https://hg.mozilla.org/mozilla-central/rev/4702329bb197
Description
•