зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1490391 - 1. Add a test for text duplication bug; r=esawin
Add a test for the text duplication bug caused by committing some text and then immediately starting another composition. Differential Revision: https://phabricator.services.mozilla.com/D9849
This commit is contained in:
Родитель
12453d9645
Коммит
8e5dc5d4db
|
@ -372,6 +372,17 @@ public class testInputConnection extends JavascriptBridgeTest {
|
|||
ic.deleteSurroundingText(1, 0);
|
||||
assertTextAndSelectionAt("Can clear text", ic, "", 0);
|
||||
|
||||
// Bug 1490391 - Committing then setting composition can result in duplicates.
|
||||
ic.commitText("far", 1);
|
||||
ic.setComposingText("bar", 1);
|
||||
assertTextAndSelectionAt("Can commit then set composition", ic, "farbar", 6);
|
||||
ic.setComposingText("baz", 1);
|
||||
assertTextAndSelectionAt("Composition still exists after setting", ic, "farbaz", 6);
|
||||
|
||||
ic.finishComposingText();
|
||||
ic.deleteSurroundingText(6, 0);
|
||||
assertTextAndSelectionAt("Can clear text", ic, "", 0);
|
||||
|
||||
// Make sure we don't leave behind stale events for the following test.
|
||||
processGeckoEvents();
|
||||
processInputConnectionEvents();
|
||||
|
|
Загрузка…
Ссылка в новой задаче