diff options
author | 2013-02-28 21:20:22 -0800 | |
---|---|---|
committer | 2013-02-28 21:20:22 -0800 | |
commit | 2768f38ea1fb7dd4e9da739d67c3a1c990bde2d4 (patch) | |
tree | 8e853b82692e2b6d8a5c4c00c5e5bf6c4babf7a8 /tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java | |
parent | b0970fa6b4ee6901a74a315410eb81d0892ceb44 (diff) | |
parent | 31747ba7874f57fe6b259e8744e42dbfe02a8d40 (diff) | |
download | latinime-2768f38ea1fb7dd4e9da739d67c3a1c990bde2d4.tar.gz latinime-2768f38ea1fb7dd4e9da739d67c3a1c990bde2d4.tar.xz latinime-2768f38ea1fb7dd4e9da739d67c3a1c990bde2d4.zip |
am 31747ba7: am abaf5827: Separate suggestions from SuggestionView
* commit '31747ba7874f57fe6b259e8744e42dbfe02a8d40':
Separate suggestions from SuggestionView
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java b/tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java index 005f8b279..333b60277 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java @@ -74,15 +74,22 @@ public class InputLogicTestsNonEnglish extends InputTestsBase { public void testWordThenSpaceDisplaysPredictions() { final String WORD_TO_TYPE = "beaujolais "; final String EXPECTED_RESULT = "nouveau"; - changeLanguage("fr"); - type(WORD_TO_TYPE); - sleep(DELAY_TO_WAIT_FOR_UNDERLINE); - runMessages(); - final SuggestionStripView suggestionStripView = - (SuggestionStripView)mInputView.findViewById(R.id.suggestion_strip_view); - final SuggestedWords suggestedWords = suggestionStripView.getSuggestions(); - assertEquals("type word then type space yields predictions for French", - EXPECTED_RESULT, suggestedWords.getWord(0)); + final boolean defaultNextWordPredictionOption = + mLatinIME.getResources().getBoolean(R.bool.config_default_next_word_prediction); + final boolean previousNextWordPredictionOption = + setBooleanPreference(NEXT_WORD_PREDICTION_OPTION, true, + defaultNextWordPredictionOption); + try { + changeLanguage("fr"); + type(WORD_TO_TYPE); + sleep(DELAY_TO_WAIT_FOR_UNDERLINE); + runMessages(); + assertEquals("type word then type space yields predictions for French", + EXPECTED_RESULT, mLatinIME.getFirstSuggestedWord()); + } finally { + setBooleanPreference(NEXT_WORD_PREDICTION_OPTION, previousNextWordPredictionOption, + defaultNextWordPredictionOption); + } } public void testAutoCorrectForGerman() { |