aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputTestsBase.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-05-14 07:18:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-14 07:18:56 +0000
commit4b6660f8f9e5f30427a86659afa75189cca01610 (patch)
tree81093eb32251ef725b87cd58889979f442d60ee9 /tests/src/com/android/inputmethod/latin/InputTestsBase.java
parenta1b7f66eb241069006c6e0d9bd609de10ec7c5da (diff)
parent68730d1c8eac4f3fad94a6525b343e2a136f4ffe (diff)
downloadlatinime-4b6660f8f9e5f30427a86659afa75189cca01610.tar.gz
latinime-4b6660f8f9e5f30427a86659afa75189cca01610.tar.xz
latinime-4b6660f8f9e5f30427a86659afa75189cca01610.zip
Merge "Fix unit tests."
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputTestsBase.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
index 260e534ee..09c53204b 100644
--- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
@@ -299,11 +299,15 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
}
protected void changeLanguage(final String locale) {
- changeLanguageWithoutWait(locale);
+ changeLanguage(locale, null);
+ }
+
+ protected void changeLanguage(final String locale, final String combiningSpec) {
+ changeLanguageWithoutWait(locale, combiningSpec);
waitForDictionariesToBeLoaded();
}
- protected void changeLanguageWithoutWait(final String locale) {
+ protected void changeLanguageWithoutWait(final String locale, final String combiningSpec) {
mEditText.mCurrentLocale = LocaleUtils.constructLocaleFromString(locale);
// TODO: this is forcing a QWERTY keyboard for all locales, which is wrong.
// It's still better than using whatever keyboard is the current one, but we
@@ -314,7 +318,8 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
"KeyboardLayoutSet=" + SubtypeLocaleUtils.QWERTY
+ "," + Constants.Subtype.ExtraValue.ASCII_CAPABLE
+ "," + Constants.Subtype.ExtraValue.ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE
- + "," + Constants.Subtype.ExtraValue.EMOJI_CAPABLE;
+ + "," + Constants.Subtype.ExtraValue.EMOJI_CAPABLE
+ + null == combiningSpec ? "" : ("," + combiningSpec);
final InputMethodSubtype subtype = InputMethodSubtypeCompatUtils.newInputMethodSubtype(
R.string.subtype_no_language_qwerty,
R.drawable.ic_ime_switcher_dark,
@@ -325,7 +330,7 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
false /* overridesImplicitlyEnabledSubtype */,
0 /* id */);
SubtypeSwitcher.getInstance().forceSubtype(subtype);
- mLatinIME.loadKeyboard();
+ mLatinIME.onCurrentInputMethodSubtypeChanged(subtype);
runMessages();
mKeyboard = mLatinIME.mKeyboardSwitcher.getKeyboard();
mLatinIME.clearPersonalizedDictionariesForTest();