TextInputDelegateTest doesn't play well with nsPresContext::UserInputEventsAllowed
Categories
(GeckoView :: General, defect)
Tracking
(firefox147 wontfix, firefox148 wontfix, firefox149 fixed)
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
The UserInputEventsAllowed check in the DOM doesn't play well with our test cases and seems to be one source of flakiness. On desktop, we mark such keyboard events during tests as synthetic, but that is a bit clumsy with out tests that use InputConnection.
As a simple fix, I'll just change the pref while the TextInputDelegateTests run.
| Assignee | ||
Comment 1•5 months ago
|
||
Synthetic tests can be flaky if they run faster than the input check so disable it
for the test. Note that on desktop we mark such inputs as synthetic to bypass the
check, but that is more awkward in our Android tests that are using InputConnection.
| Assignee | ||
Comment 2•5 months ago
|
||
| Assignee | ||
Updated•5 months ago
|
Comment 4•5 months ago
|
||
| bugherder | ||
Updated•5 months ago
|
| Assignee | ||
Comment 5•5 months ago
|
||
The remaining inputConnection_setSelection test is still flaky due to race condition here. If I remove the guard and always send the message then the test reliably works for me. The problem is that check was added to fix Bug 1563640. I tried to reproduce on Fennec68/Pixel3/SwiftKey7.7 but was not able to (probably because my OS is updated). Without more insight into that old bug I'm slightly cautious about changing things even though the current code is itself race-y.
Makoto, do you have any thoughts about if we should try to fix this, or keep the test disabled for now?
Comment 7•5 months ago
|
||
| bugherder | ||
Comment 8•5 months ago
•
|
||
At that time, mobile twitter used another library to input tweet. Currently they use something contenteditable library (draft.js or Lexical) on mobile site.
So please keep setSelection is disabled. I can reproduce original issue on simply <textarea> with the latest version of SwiftKey EN keyboard when backed out original fix.
Also I should add more test case to emulate IME...
Comment 9•5 months ago
|
||
I added SwiftKey emulation by bug 2012938
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Updated•5 months ago
|
Description
•