Bug 1651019 - Check current inputted value to avoid timing issue. r=geckoview-reviewers,esawin

To sync Gecko's text with Java text correctly, I would like to add more text
and selection check each `InputConnection.setComposingText` call.

Differential Revision: https://phabricator.services.mozilla.com/D83464
This commit is contained in:
Makoto Kato 2020-07-14 13:15:11 +00:00
Родитель 4254bae54a
Коммит 1b95a01795
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -866,10 +866,15 @@ class TextInputDelegateTest : BaseSessionTest() {
""")
setComposingText(ic, "b", 1)
setComposingText(ic, "a", 1)
pressKey(ic, KeyEvent.KEYCODE_R)
assertTextAndSelectionAt("Don't change caret position after calling blur and focus",
ic, "b", 1)
assertText("Can set composition string after calling blur and focus",
setComposingText(ic, "a", 1)
assertTextAndSelectionAt("Can set composition string after calling blur and focus",
ic, "ba", 2)
pressKey(ic, KeyEvent.KEYCODE_R)
assertText("Can set input string by keypress after calling blur and focus",
ic, "bar")
}
}