Closed Bug 1621319 Opened 5 years ago Closed 5 years ago

Two non-native widget test fixes.

Categories

(Core :: Widget, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(3 files)

No description provided.

Our <select multiple> has enough padding so that both sides take more space that
one list item, and since this test sets the height explicitly and <select> has
box-sizing: border-box by default, page-up / page-down steps through one less
item than what the test expects.

I think this is a test bug, but let me know if you want some bug on file to
consider reducing this padding for non-native theme.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

I've left checkbox / radio / range-thumb alone because they don't have borders
on gtk either. We need this for the next patch to fix our test.

In particular, our combination of padding + no border means that
sanityEventUtils tries to hit an <input>, but it hits the anonymous scrollable
element instead, and asserts that it doesn't.

I don't think that test is particularly correct, but implementing
GetWidgetBorder works around it, and seems like the right thing to do anyways.

Depends on D66239

Depending on the widget implementation details, hitting one pixel inside the
input may hit the input itself, or may hit the anonymous scrollable element
instead.

synthesizeMouseExpectEvent checks the originalTarget, for some reason:

https://searchfox.org/mozilla-central/rev/070a000dd49aac4a26147e137efcd91a728d13b8/testing/mochitest/tests/SimpleTest/EventUtils.js#1419

I'm not sure what the reason for that is, or why test_sanityEventUtils needs to
test it using an <input>, but I don't want to think too hard about it.

This ensures we hit the border on the <input> and thus target the right element.

Depends on D66240

See Also: → 1621331
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b65f1bde461a fix test_bug365410.html with non-native theme enabled. r=mstange https://hg.mozilla.org/integration/autoland/rev/0522121ddf22 Implement GetWidgetBorder properly for some widgets. r=mstange https://hg.mozilla.org/integration/autoland/rev/9181798549f2 Make test_sanityEventUtils hit the border of the input, not the contents inside. r=smaug
Attachment #9132283 - Attachment description: Bug 1621319 - Make test_sanityEventUtils hit the border of the input, not the contents inside. r=smaug → Bug 1621319 - Make test_sanityEventUtils test synthesizeMouseExpectEvent with something else than a form control. r=smaug
Flags: needinfo?(emilio)
Keywords: leave-open
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b57063dccba3 fix test_bug365410.html with non-native theme enabled. r=mstange https://hg.mozilla.org/integration/autoland/rev/867b615582c9 Implement GetWidgetBorder properly for some widgets. r=mstange
Keywords: leave-open
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/efb8d3e172eb Make test_sanityEventUtils test synthesizeMouseExpectEvent with something else than a form control. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: