aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorDan Zivkovic <zivkovic@google.com>2015-03-13 14:50:54 -0700
committerDan Zivkovic <zivkovic@google.com>2015-03-16 11:23:22 -0700
commit5455179b54eb8230577f518db082796a3055685a (patch)
tree9e5c38575cbee4e96e2325e8c211a5b2a3a3d5fc /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parent180a1e363f84f425e1b1d001e15e28df03f9181e (diff)
downloadlatinime-5455179b54eb8230577f518db082796a3055685a.tar.gz
latinime-5455179b54eb8230577f518db082796a3055685a.tar.xz
latinime-5455179b54eb8230577f518db082796a3055685a.zip
Revert "Next-word suggestion bit in keyboard settings."
This reverts commit 1ae16dc3db170802d1b38273f477125a2a969d32. Bug 19596067. Change-Id: Ie7286acbb70b215d7bd08e271bcf14526b68576f
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputLogicTests.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
index e09b1e936..b1b48135f 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
@@ -502,11 +502,9 @@ public class InputLogicTests extends InputTestsBase {
type(" ");
sleep(DELAY_TO_WAIT_FOR_PREDICTIONS_MILLIS);
runMessages();
- // Corrections have been replaced with predictions.
+ // Test the predictions have been cleared
SuggestedWords suggestedWords = mLatinIME.getSuggestedWordsForTest();
- String word = suggestedWords == null ? null : suggestedWords.getWord(0);
- assertTrue("predictions after double-space-to-period is I or The",
- "I".equals(word) || "The".equals(word));
+ assertEquals("predictions cleared after double-space-to-period", suggestedWords.size(), 0);
type(Constants.CODE_DELETE);
sleep(DELAY_TO_WAIT_FOR_PREDICTIONS_MILLIS);
runMessages();
@@ -529,6 +527,23 @@ public class InputLogicTests extends InputTestsBase {
suggestedWords.size() > 0 ? suggestedWords.getWord(0) : null);
}
+ public void testPredictionsAfterPeriod() {
+ mLatinIME.clearPersonalizedDictionariesForTest();
+ final String WORD_TO_TYPE = "Barack. ";
+ type(WORD_TO_TYPE);
+ sleep(DELAY_TO_WAIT_FOR_PREDICTIONS_MILLIS);
+ runMessages();
+ SuggestedWords suggestedWords = mLatinIME.getSuggestedWordsForTest();
+ assertEquals("No prediction after period after inputting once.", 0, suggestedWords.size());
+
+ type(WORD_TO_TYPE);
+ sleep(DELAY_TO_WAIT_FOR_PREDICTIONS_MILLIS);
+ runMessages();
+ suggestedWords = mLatinIME.getSuggestedWordsForTest();
+ assertEquals("Beginning-of-Sentence prediction after inputting 2 times.", "Barack",
+ suggestedWords.size() > 0 ? suggestedWords.getWord(0) : null);
+ }
+
public void testPredictionsAfterRecorrection() {
final String PREFIX = "A ";
final String WORD_TO_TYPE = "Barack";