Remove enablePrivilege usage from tests for password manager

RESOLVED FIXED in mozilla26

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: emk, Assigned: emk)

Tracking

unspecified
mozilla26
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Posted patch patchSplinter Review
- Bare nsIObserver didn't work well with SpecialPowers. I replaced it with   SpecialPowers.addObserver/removeObserver.
- Looks like removeObserver is confused by the custom QueryInterface
  implementation on the observer. Fortunately I could just remove it.
- Replaced some instanceof checks with SpecialPowers.call_Instanceof.
- Uncommented a test expecting that enablePrivilege is NOT used.

Feel free to redirect if you think a password manager module owner should review this.
Attachment #800798 - Flags: review?(bobbyholley+bmo)
OS: Windows 8 → All
Hardware: x86_64 → All
Comment on attachment 800798 [details] [diff] [review]
patch

Review of attachment 800798 [details] [diff] [review]:
-----------------------------------------------------------------

\o/

::: toolkit/components/passwordmgr/test/test_bug_627616.html
@@ +21,5 @@
>        QueryInterface : function (iid) {
>          const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports];
>  
>          if (!interfaces.some( function(v) { return iid.equals(v) } ))
> +          throw SpecialPowers.wrap(SpecialPowers.Components).results.NS_ERROR_NO_INTERFACE;

SpecialPowers.Cr?
Attachment #800798 - Flags: review?(bobbyholley+bmo) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/55e14139d909
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/55e14139d909
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.