layout/base/tests/test_interactive_widget.html fails on new android 14 emulator
Categories
(Core :: Layout, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox144 | --- | fixed |
People
(Reporter: jmaher, Assigned: hiro)
References
Details
Attachments
(2 files)
on this try push, there are many failures, but it appears that in all instances layout/base/tests/test_interactive_widget.html is failing with test timed out (as per this log)
I am planning on skipping this test on android 14 in bug 1982943.
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
I am testing on Android 16 so things might be different from on Android 14 though, what I've found so far is that the software keyboard doesn't appear by default even on Chrome. We have to change the Gboard (the default keyboard app on Android) setting, we need to turn on "Show on-screen keyboard" in "Write in test fields".
With the change, I can see the software keyboard on GeckoView example. But still the software keyboard seems not to appear on GeckoView test runner.
| Reporter | ||
Comment 2•1 year ago
|
||
is there a way to set this keyboard so we can test in CI? maybe some adb command to set a prop ?
| Assignee | ||
Comment 3•1 year ago
|
||
I am afraid I don't know. That's said, it's probably unrelated the failure on Android 14. I've also setup Android 14 emulator, by default the keyboard appears on GeckoView example.
Also I've found a reason why the keyboard doesn't appear on the test runner. While running the test on Android 14, I've got
InputMethodManager: Ignoring showSoftInput() as view=org.mozilla.geckoview.GeckoView{7bf8fc1 VFE...... ........ 0,0-1080,2137} is not serve
So apparently GeckoView tried to show the keyboard but it failed. It looks like the failure reason is that GeckoView's view doesn't have the focus.
I have a workaround to take the focus and it seems to work.
https://treeherder.mozilla.org/jobs?repo=try&revision=0539cadc3cfea351008e3bd8c8012f9f456adcfb
| Assignee | ||
Comment 4•1 year ago
|
||
While running test_interactive_widget.html on Android 14
"InputMethodManager: Ignoring showSoftInput() as
view=org.mozilla.geckoview.GeckoView{7bf8fc1 VFE...... ........ 0,0-1080,2137}
is not served." appears in adb log. The message is output in
InputMethodManager.showSoftInput when the
hasServedByInputMethodLocked(view) check fails [1]. The check was
introduced in this commit [2]. As the commit message implies, when the
test fails GeckoView doesn't have focus.
On the other hand, even on GeckoView test runner, showShoftInput call
doesn't fail if the function is invoked via real touch events such as
tapping an input element by user.
Actually the test uses synthesizeNativeTouchPoint which aims to send a given
event directly to our PanZoomController.onTouchEvent function [3], it's
slightly different from touch events by users. I.e.
the events generated by synthesizeNativeTouchPoint don't run through the
path where OS level events run.
A natural question here is that "is there any API to synthesize OS level
events?". Indeed UI Automator uses InputManager.injectInputEvent API [4]
to send an OS level event, but the API seems to be hidden given that there's
no description in the InputManager reference [5]. Thus using the API is not
realistic for us.
So, we'd rather just try to obtain the focus when we synthesize an
ACTION_POINTER_DOWN event.
[1] https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java;l=2451-2456;drc=0df41fe0de672fc9d30ec2db1cd09faecbb0fe0e?hl=ja
[2] https://cs.android.com/android/_/android/platform/frameworks/base/+/970d9d2e0c979cf9a0ff0a79ef49044ed1363d4f?hl=ja
[3] https://searchfox.org/firefox-main/rev/ee102e926521b3e460293b0aea6b54b1a03f6f74/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/PanZoomController.java#926
[4] https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/android/app/UiAutomationConnection.java#164
[5] https://developer.android.com/reference/android/hardware/input/InputManager
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Backed out for causing mochitest failures on test_interactive_widget.html
| Assignee | ||
Comment 8•1 year ago
|
||
Looks like the failure happens only on X-orig run.
| Assignee | ||
Comment 9•1 year ago
|
||
Geez, the test works fine on my local Android 34 emulator with --enable-xorigin-tests.
| Assignee | ||
Comment 10•1 year ago
|
||
It looks like on recent-ish versions of Android we never receive
MozAfterEvent after the software keyboard appeared, in other words on
older versions of Android we receive a MozAfterEvent there for some
reasons even on overlays-content mode. This is quite odd since there's
no need to paint, thus we can drop promiseAfterPaint calls.
Also we wait for focus() in each test case so we don't need to wait
for any MozAfterEvent.
| Assignee | ||
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e32697b4ecd5
https://hg.mozilla.org/mozilla-central/rev/4e411fec288d
Updated•1 year ago
|
Description
•