Open Bug 1496150 Opened 6 years ago Updated 2 years ago

xpcshell testing isPrivileged is wonky with unexpected fail.

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: mixedpuppy, Unassigned)

References

Details

There is logic in ExtensionTestCommon[1] that leads one to believe that we test non-privileged extensions, but that you can set isPrivileged and isSystem to specifically test those.

However, it is untrue that we ever test non-privileged code, unless you do other magic incantations.  Essentially the logic in ExtensionTestCommon doesn't really do anything at all.

Instead, one must use AddonTestUtils.usePrivilegedSignatures, setting to false if you don't want privileged extensions.  (note that can also be a function taking an id as param).  You are not additionally required to pass isPrivileged to loadExtension.  

[1] https://searchfox.org/mozilla-central/rev/3c85ea2f8700ab17e38b82d77cd44644b4dae703/toolkit/components/extensions/ExtensionTestCommon.jsm#407
Summary: xpcshell testsing isPrivileged is wonky with unexpected fail. → xpcshell testing isPrivileged is wonky with unexpected fail.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.