Closed Bug 1180840 Opened 9 years ago Closed 9 years ago

mouseOnElement guesses the wrong position in test_focus.xul on some GTK themes

Categories

(Core :: DOM: Core & HTML, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: acomminos, Assigned: acomminos)

References

Details

Attachments

(1 file, 1 obsolete file)

The test dom/tests/mochitest/chrome/test_focus.xul expects the mouseOnElement helper to select the 0th indexed position in a text field- on some platforms that rely on the native theme for text field padding (such as GTK), it can 'miss' and cause the following test failures:

1652 INFO TEST-UNEXPECTED-FAIL | dom/tests/mochitest/chrome/test_focus.xul | input focused from mouse selectionStart - got 1, expected 0
1653 INFO TEST-UNEXPECTED-FAIL | dom/tests/mochitest/chrome/test_focus.xul | input focused from mouse selectionEnd - got 1, expected 0

mouseOnElement currently guesses the 0th index to be at (4,4). The test should be modified to use the computed padding to select the correct position regardless of native padding.
This patch removes the selection position expectation from window_focus.xul for mouse focus. Thanks!
Attachment #8631082 - Flags: review?(enndeakin)
Comment on attachment 8631082 [details] [diff] [review]
Make test_focus.xul not expect a specific text selection position after mouse event synthesis.

That's ok if you change the description to "input focused from mouse selection" or something like that.
Attachment #8631082 - Flags: review?(enndeakin) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ca56f6ea195c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: