test_moz_toggle.html clicks a zero-size description element, so the result depends on sub-pixel layout
Categories
(Toolkit :: UI Widgets, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: florian, Assigned: florian, NeedInfo)
References
Details
Attachments
(1 external file)
testMozToggleInteraction in toolkit/content/tests/widgets/test_moz_toggle.html renders a moz-toggle without a description, then calls synthesizeMouseAtCenter(mozToggle.descriptionEl). The empty description is a 0x0 box at the label's bottom-left corner, so the click lands on a boundary point: with a fractional frame offset it hits the label, which toggles and focuses the button ("Input elements emit the expected number of events. - got 3, expected +0"). This shows in the upcoming mochitest-chrome-repeat jobs. When it passes, the click misses the element entirely, so the check never tested anything.
The fix gives the toggle a description so the click hits real text, and expects the single click event without a toggle.
| Assignee | ||
Comment 1•14 days ago
|
||
Without a description, descriptionEl is a 0x0 box at the label's bottom-left corner, so whether the click on it lands on the label (and toggles the button) depends on the sub-pixel position of the test frame, and the old empty expectation only held when the click hit nothing at all. With real description text, the click now bubbles out of moz-toggle as one click that neither toggles nor focuses the button.
Comment 2•7 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'Toolkit::UI Widgets' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 5•6 days ago
|
||
Backed out for causing lint failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/410c63226a78246d4bbc8ae316b2345728ac2072
Comment 7•6 days ago
|
||
| bugherder | ||
Description
•