aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-06-25 20:20:44 +0900
committerKeisuke Kuroyanagi <ksk@google.com>2014-06-25 20:20:44 +0900
commit0aef59746c6dd32ea3e3ed0d25b5fbc33e4605d8 (patch)
tree1c45a154be69c5af84f4f4752d1352b29e7f9902 /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parent3c07fcbc544cac626dead40e7571233950b49216 (diff)
downloadlatinime-0aef59746c6dd32ea3e3ed0d25b5fbc33e4605d8.tar.gz
latinime-0aef59746c6dd32ea3e3ed0d25b5fbc33e4605d8.tar.xz
latinime-0aef59746c6dd32ea3e3ed0d25b5fbc33e4605d8.zip
Make Beginning-of-Sentence prediction require two exposures.
Bug: 15868192 Change-Id: I4b577ad11c992d872d6f902fd50527d9ca5cc1ba
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() {