diff options
Diffstat (limited to 'tests/src')
3 files changed, 26 insertions, 6 deletions
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTestsBase.java b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTestsBase.java index 7923afc1a..b8cb11b6b 100644 --- a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTestsBase.java +++ b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTestsBase.java @@ -251,14 +251,14 @@ abstract class KeySpecParserTestsBase extends AndroidTestCase { } public void testResourceReference() { - assertParser("Settings as more key", "!text/settings_as_more_key", + assertParser("Settings as more key", "!text/keyspec_settings", null, null, mSettingsIconId, mCodeSettings); assertParser("Action next as more key", "!text/label_next_key|!code/key_action_next", "Next", null, ICON_UNDEFINED, mCodeActionNext); assertParser("Popular domain", - "!text/keylabel_for_popular_domain|!text/keylabel_for_popular_domain ", + "!text/keyspec_popular_domain|!text/keyspec_popular_domain ", ".com", ".com ", ICON_UNDEFINED, CODE_OUTPUT_TEXT); } diff --git a/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java b/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java index a1933076a..514ad1cf0 100644 --- a/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java +++ b/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java @@ -355,16 +355,16 @@ public class MoreKeySpecSplitTests extends InstrumentationTestCase { } public void testLabelReferece() { - assertTextArray("Label time am", "!text/label_time_am", "AM"); + assertTextArray("Label time am", "!text/keylabel_time_am", "AM"); - assertTextArray("More keys for am pm", "!text/more_keys_for_am_pm", + assertTextArray("More keys for am pm", "!text/morekeys_am_pm", "!fixedColumnOrder!2", "!hasLabels!", "AM", "PM"); - assertTextArray("Settings as more key", "!text/settings_as_more_key", + assertTextArray("Settings as more key", "!text/keyspec_settings", "!icon/settings_key|!code/key_settings"); assertTextArray("Indirect naviagte actions as more key", - "!text/indirect_navigate_actions_as_more_key", + "!text/keyspec_indirect_navigate_actions", "!fixedColumnOrder!2", "!hasLabels!", "Prev|!code/key_action_previous", "!hasLabels!", "Next|!code/key_action_next"); diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java index ab6245635..d4e6ad87a 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java @@ -454,4 +454,24 @@ public class InputLogicTests extends InputTestsBase { assertEquals("predictions after recorrection", "Obama", suggestedWords.size() > 0 ? suggestedWords.getWord(0) : null); } + + public void testComposingMultipleBackspace() { + final String WORD_TO_TYPE = "radklro"; + final int TIMES_TO_TYPE = 3; + final int TIMES_TO_BACKSPACE = 8; + type(WORD_TO_TYPE); + type(Constants.CODE_DELETE); + type(Constants.CODE_DELETE); + type(Constants.CODE_DELETE); + type(WORD_TO_TYPE); + type(Constants.CODE_DELETE); + type(Constants.CODE_DELETE); + type(WORD_TO_TYPE); + type(Constants.CODE_DELETE); + type(Constants.CODE_DELETE); + type(Constants.CODE_DELETE); + assertEquals("composing with multiple backspace", + WORD_TO_TYPE.length() * TIMES_TO_TYPE - TIMES_TO_BACKSPACE, + mEditText.getText().length()); + } } |