aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-06-26 05:02:15 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-06-26 05:02:15 +0000
commit8000869191aca365db727a84fc35ce41fbca25ee (patch)
tree067c436e394ff4eead3d16e1819ab389e7719beb /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parent2e623081a711dace56d2e8ba04da8aaba798997a (diff)
parent520765491cbfcb8d2e66ee5c492a66eb8a726a74 (diff)
downloadlatinime-8000869191aca365db727a84fc35ce41fbca25ee.tar.gz
latinime-8000869191aca365db727a84fc35ce41fbca25ee.tar.xz
latinime-8000869191aca365db727a84fc35ce41fbca25ee.zip
am 52076549: Merge "Make Beginning-of-Sentence prediction require two exposures."
* commit '520765491cbfcb8d2e66ee5c492a66eb8a726a74': Make Beginning-of-Sentence prediction require two exposures.
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputLogicTests.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
index 2709ecba6..0552c221e 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
@@ -517,15 +517,21 @@ public class InputLogicTests extends InputTestsBase {
suggestedWords.size() > 0 ? suggestedWords.getWord(0) : null);
}
- public void testNoPredictionsAfterPeriod() {
+ public void testPredictionsAfterPeriod() {
mLatinIME.clearPersonalizedDictionariesForTest();
final String WORD_TO_TYPE = "Barack. ";
type(WORD_TO_TYPE);
sleep(DELAY_TO_WAIT_FOR_PREDICTIONS);
runMessages();
- // Test the first prediction is not displayed
- final SuggestedWords suggestedWords = mLatinIME.getSuggestedWordsForTest();
- assertEquals("no prediction after period", 0, suggestedWords.size());
+ 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);
+ runMessages();
+ suggestedWords = mLatinIME.getSuggestedWordsForTest();
+ assertEquals("Beginning-of-Sentence prediction after inputting 2 times.", "Barack",
+ suggestedWords.size() > 0 ? suggestedWords.getWord(0) : null);
}
public void testPredictionsAfterRecorrection() {