diff options
author | 2014-05-14 07:21:45 +0000 | |
---|---|---|
committer | 2014-05-14 07:21:45 +0000 | |
commit | b185aee6dc7a32c912447b381d87deddacd32fb8 (patch) | |
tree | 81093eb32251ef725b87cd58889979f442d60ee9 /tests/src/com/android/inputmethod/latin/InputTestsBase.java | |
parent | f65fbea795dbe3084240363fa71283b78649ff71 (diff) | |
parent | 4b6660f8f9e5f30427a86659afa75189cca01610 (diff) | |
download | latinime-b185aee6dc7a32c912447b381d87deddacd32fb8.tar.gz latinime-b185aee6dc7a32c912447b381d87deddacd32fb8.tar.xz latinime-b185aee6dc7a32c912447b381d87deddacd32fb8.zip |
am 4b6660f8: Merge "Fix unit tests."
* commit '4b6660f8f9e5f30427a86659afa75189cca01610':
Fix unit tests.
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputTestsBase.java | 13 |
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(); |