Closed Bug 527804 Opened 10 years ago Closed 4 years ago

Tracking bug for reftests / crashtests that use enablePrivilege & need converting to mochitests

Categories

(Core Graveyard :: Tracking, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: dholbert, Unassigned)

References

Details

(Keywords: meta)

Filing this tracking bug per a discussion in #developers today -- some crashtests and reftests try to use

> netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

which will pop up a permissions dialog rather than actually enabling the privilege.

Those tests probably need to be converted to mochitests, since the mochitest framework sets up a profile that auto-grants enablePrivilege requests (so there won't be a pop-up dialog).

Relevant MXR searches:
http://mxr.mozilla.org/mozilla-central/search?string=enablePrivilege&find=reftest&tree=mozilla-central
http://mxr.mozilla.org/mozilla-central/search?string=enablePrivilege&find=crashtest&tree=mozilla-central
I think all of the affected tests are currently disabled one way or another, because having them enabled causes massive failures, as noted in bug 414740 comment 12.
Keywords: meta
Blocks: 546848
Per bug 448676, reftests *can't* currently run with privileges.

(Mochitests get away with it because the harness sets all the right prefs in the testing profile.)
Yeah, they can't run with privileges, which is why the ones that request privileges are disabled, so they should be converted to mochitests (if there are any left).
Crashtests has the specialPowers extension embedded now (bug 792029), so no need anymore to convert those to mochitests.
Does that mean enablePrivilege("UniversalXPConnect") works in crashtests now, or should they be getting privileges a different way?

This search...
 http://mxr.mozilla.org/mozilla-central/search?string=enablePrivilege&find=crashtest
...finds 2 crashtests that request privileges:
{
/accessible/tests/crashtests/471493.xul (View Hg log or Hg annotations)

    line 12 -- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

/layout/mathml/crashtests/400157.xhtml (View Hg log or Hg annotations)

    line 8 -- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    line 19 -- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
...though neither of those crashtests are disabled in their manifest.

Does that mean everything is as it should be now? or do we need to change those tests' invocations to use a new API?
I just filed bug 917061 to fix the 2 remaining crashtests that use enablePrivilege.
I filed bug 917056 for fixing 1 of the reftests that use enablePrivilege

The other reftests that use enablePrivilege should be converted to mochitests, I think.

The plan is that enablePrivilege is going away, so if tests need privileges, they should be getting it in a different way.
I filed bug 918258 for the 2 reftests that have enablePrivilege in them.
Marking all tracking bugs which haven't been updated since 2014 as INCOMPLETE.
If this bug is still relevant, please reopen it and move it into a bugzilla component related to the work
being tracked. The Core: Tracking component will no longer be used.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.