diff options
author | 2013-08-16 05:08:58 -0700 | |
---|---|---|
committer | 2013-08-16 05:08:58 -0700 | |
commit | 5b0aeafb5efc9d7d176836d3302daff1ae81b17b (patch) | |
tree | cbd543e5857c9b2de546db80fa4f5cf925edc585 /tests/src/com/android/inputmethod/latin/InputTestsBase.java | |
parent | f404756b1764a558e883357183df4f1b55a7f9a7 (diff) | |
parent | e32475611ce52671802ca8d2f9694bbb82c4b120 (diff) | |
download | latinime-5b0aeafb5efc9d7d176836d3302daff1ae81b17b.tar.gz latinime-5b0aeafb5efc9d7d176836d3302daff1ae81b17b.tar.xz latinime-5b0aeafb5efc9d7d176836d3302daff1ae81b17b.zip |
am e3247561: Merge "Support languages that don\'t use spaces."
* commit 'e32475611ce52671802ca8d2f9694bbb82c4b120':
Support languages that don't use spaces.
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputTestsBase.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java index cc3e0d74d..480570e62 100644 --- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java +++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java @@ -46,6 +46,8 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> { // The message that sets the underline is posted with a 100 ms delay protected static final int DELAY_TO_WAIT_FOR_UNDERLINE = 200; + // The message that sets predictions is posted with a 100 ms delay + protected static final int DELAY_TO_WAIT_FOR_PREDICTIONS = 200; protected LatinIME mLatinIME; protected Keyboard mKeyboard; @@ -233,9 +235,6 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> { --remainingAttempts; } } - if (!mLatinIME.hasMainDictionary()) { - throw new RuntimeException("Can't initialize the main dictionary"); - } } protected void changeLanguage(final String locale) { @@ -247,6 +246,16 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> { waitForDictionaryToBeLoaded(); } + protected void changeKeyboardLocaleAndDictLocale(final String keyboardLocale, + final String dictLocale) { + changeLanguage(keyboardLocale); + if (!keyboardLocale.equals(dictLocale)) { + mLatinIME.replaceMainDictionaryForTest( + LocaleUtils.constructLocaleFromString(dictLocale)); + } + waitForDictionaryToBeLoaded(); + } + protected void pickSuggestionManually(final int index, final String suggestion) { mLatinIME.pickSuggestionManually(index, new SuggestedWordInfo(suggestion, 1, SuggestedWordInfo.KIND_CORRECTION, "main")); |