aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputTestsBase.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-08-15 16:31:29 +0900
committerJean Chalard <jchalard@google.com>2013-08-16 21:01:08 +0900
commitc239a34262358e51aedb15f2e315bbe9bcd57c4b (patch)
tree908ab7adecbba19a65886a75240e7ec683f3ca37 /tests/src/com/android/inputmethod/latin/InputTestsBase.java
parenta440aa391c54b7d0d35a64aa4418ca1811518fa2 (diff)
downloadlatinime-c239a34262358e51aedb15f2e315bbe9bcd57c4b.tar.gz
latinime-c239a34262358e51aedb15f2e315bbe9bcd57c4b.tar.xz
latinime-c239a34262358e51aedb15f2e315bbe9bcd57c4b.zip
Support languages that don't use spaces.
Thai is an example. Bug: 10138062 Change-Id: Ib9a8264c77ed42b4256432d7c8a60d08575dcdc7
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputTestsBase.java15
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"));