Closed
Bug 789494
Opened 12 years ago
Closed 12 years ago
Remove enablePrivilege from mochitests that misbehave with bug 789224
Categories
(Testing :: General, defect)
Testing
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla18
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(1 file)
20.90 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
In bug 789224, I'm consolidating the 'are we privileged?' security check code into nsContentUtils::IsCallerChrome, which checks for system principal _and_ UniversalXPConnect. This causes a number of mochitests that use enablePrivilege to break, because they succeed in being chrome where they didn't previously expect to.
Thankfully, enablePrivilege now exists solely for the purposes of making our legacy tests go green, so updating those tests is a perfectly acceptable approach.
Assignee | ||
Comment 1•12 years ago
|
||
Attaching a patch. Flagging Andrew for review since he's now got some experience with this stuff. :-)
Attachment #659279 -
Flags: review?(continuation)
Assignee | ||
Comment 2•12 years ago
|
||
Pushed this to try along with the patches in bug 788914.
https://tbpl.mozilla.org/?tree=Try&rev=e418fdd6aecb
Comment 3•12 years ago
|
||
Comment on attachment 659279 [details] [diff] [review]
Rip enablePrivilege out of misbehaving mochitests. v1
Review of attachment 659279 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/events/test/test_bug448602.html
@@ +105,5 @@
> // Event target chain tests
> var l2 = document.getElementById("testlevel2");
> var l3 = document.getElementById("testlevel3");
> var textnode = l3.firstChild;
> + var chain = SpecialPowers.unwrap(els.getEventTargetChainFor(textnode, {}));
Why do you need the unwrap here?
Attachment #659279 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #3)
> Comment on attachment 659279 [details] [diff] [review]
> Rip enablePrivilege out of misbehaving mochitests. v1
>
> Review of attachment 659279 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: content/events/test/test_bug448602.html
> @@ +105,5 @@
> > // Event target chain tests
> > var l2 = document.getElementById("testlevel2");
> > var l3 = document.getElementById("testlevel3");
> > var textnode = l3.firstChild;
> > + var chain = SpecialPowers.unwrap(els.getEventTargetChainFor(textnode, {}));
>
> Why do you need the unwrap here?
Because the subsequent code does a lot of identity comparisons with chain[i], which end up being SpecialPowers wrappers without the unwrap (meaning that they fail the identity checks).
Thanks for the quick review, Andrew!
Assignee | ||
Comment 5•12 years ago
|
||
Looks green. Pushed to m-i:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e8b6bc9c9269
Comment 6•12 years ago
|
||
Sorry, this had to be backed out due to assertion failures from bug 788914.
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc73c2c680d1
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
I inadvertently merged this over to m-c. And then backed it back out.
https://hg.mozilla.org/mozilla-central/rev/591eb47f6bd3
Assignee | ||
Comment 9•12 years ago
|
||
Comment 10•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•