From d36328cecf3b0c5e7acde7bd5963ea670b8d634f Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Thu, 20 Feb 2014 22:20:43 +0900 Subject: Add test only methods to test personalized dicts. Bug: 11122480 Change-Id: I79a4a73ff09a2d34d4ca094d705e901fb4bc855c --- tests/src/com/android/inputmethod/latin/InputTestsBase.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java') diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java index 4b157e700..690c559e8 100644 --- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java +++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java @@ -275,9 +275,9 @@ public class InputTestsBase extends ServiceTestCase { } } - protected void waitForDictionaryToBeLoaded() { + protected void waitForDictionariesToBeLoaded() { try { - mLatinIME.waitForMainDictionary( + mLatinIME.waitForLoadingDictionaries( TIMEOUT_TO_WAIT_FOR_LOADING_MAIN_DICTIONARY_IN_SECONDS, TimeUnit.SECONDS); } catch (InterruptedException e) { Log.e(TAG, "Interrupted during waiting for loading main dictionary.", e); @@ -286,7 +286,7 @@ public class InputTestsBase extends ServiceTestCase { protected void changeLanguage(final String locale) { changeLanguageWithoutWait(locale); - waitForDictionaryToBeLoaded(); + waitForDictionariesToBeLoaded(); } protected void changeLanguageWithoutWait(final String locale) { @@ -314,6 +314,7 @@ public class InputTestsBase extends ServiceTestCase { mLatinIME.loadKeyboard(); runMessages(); mKeyboard = mLatinIME.mKeyboardSwitcher.getKeyboard(); + mLatinIME.clearPersonalizedDictionariesForTest(); } protected void changeKeyboardLocaleAndDictLocale(final String keyboardLocale, @@ -322,7 +323,7 @@ public class InputTestsBase extends ServiceTestCase { if (!keyboardLocale.equals(dictLocale)) { mLatinIME.replaceDictionariesForTest(LocaleUtils.constructLocaleFromString(dictLocale)); } - waitForDictionaryToBeLoaded(); + waitForDictionariesToBeLoaded(); } protected void pickSuggestionManually(final int index, final String suggestion) { -- cgit v1.2.3-83-g751a