aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorDan Zivkovic <zivkovic@google.com>2015-03-04 10:54:50 -0800
committerDan Zivkovic <zivkovic@google.com>2015-03-04 15:02:53 -0800
commit1ae16dc3db170802d1b38273f477125a2a969d32 (patch)
tree1628004f1e78e57b8c84d50c359c29bed4d14dc7 /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parent83e95e601876a2f7938da8a3f773f9ef088a23ab (diff)
downloadlatinime-1ae16dc3db170802d1b38273f477125a2a969d32.tar.gz
latinime-1ae16dc3db170802d1b38273f477125a2a969d32.tar.xz
latinime-1ae16dc3db170802d1b38273f477125a2a969d32.zip
Next-word suggestion bit in keyboard settings.
This feature works in supported languages. We don't need a user setting. Bug 19596067. Change-Id: Icdded772745f9816da47f8a5e3b87b733083b121
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, 4 insertions, 19 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
index c76f6f446..7647773e7 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
@@ -504,9 +504,11 @@ public class InputLogicTests extends InputTestsBase {
type(" ");
sleep(DELAY_TO_WAIT_FOR_PREDICTIONS_MILLIS);
runMessages();
- // Test the predictions have been cleared
+ // Corrections have been replaced with predictions.
SuggestedWords suggestedWords = mLatinIME.getSuggestedWordsForTest();
- assertEquals("predictions cleared after double-space-to-period", suggestedWords.size(), 0);
+ 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));
type(Constants.CODE_DELETE);
sleep(DELAY_TO_WAIT_FOR_PREDICTIONS_MILLIS);
runMessages();
@@ -529,23 +531,6 @@ 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";