Closed Bug 1150207 Opened 5 years ago Closed 5 years ago

test_cocoa_focus.html doesn't do focusing consistently, leads to unexpected ordering of actions

Categories

(Core :: Plug-ins, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

In bug 920013 a bunch of window.focus-type calls were turned into SpecialPowers.focus(window)-type equivalents. However not all of them were converted. As part of bug 1146349 I'm making native event synthesization asynchronous, and my changes seem to have exposed a bug in this SpecialPowers conversion. Specifically, one of the window.focus() calls was not converted, and this causes problems because it means a previous SpecialPowers.focus (which seems to be async somehow) takes effect afterwards. This out-of-order execution causes the test to fail with my changes.

I have a simple patch to fix this and it seems to work, will put it up shortly.
Attached patch FixSplinter Review
Try push with this change has test_cocoa_focus passing on all OS X platforms: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d51e3cd115df
Attachment #8586979 - Flags: review?(martijn.martijn)
Comment on attachment 8586979 [details] [diff] [review]
Fix

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

Thanks for fixing, that definitely makes sense. To be honest, at some point, I was mainly doing trial and eror to get this test fixed in bug 920013, so that's why I didn't really pay attention to this inconsistency.
Attachment #8586979 - Flags: review?(martijn.martijn) → review+
https://hg.mozilla.org/mozilla-central/rev/6f6ecb6f3435
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.