aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputTestsBase.java
diff options
context:
space:
mode:
authorYuichiro Hanada <yhanada@google.com>2013-09-05 17:56:00 +0900
committerYuichiro Hanada <yhanada@google.com>2013-09-09 14:47:26 +0900
commitcc2751ba03fad6af5da0a7b5d421963e040d690f (patch)
tree9325e61600e9a93c3ac4d5b5756f8a494c03a63e /tests/src/com/android/inputmethod/latin/InputTestsBase.java
parent37e0fd2ff04a2a87e421abea8bc407bd312dbfc6 (diff)
downloadlatinime-cc2751ba03fad6af5da0a7b5d421963e040d690f.tar.gz
latinime-cc2751ba03fad6af5da0a7b5d421963e040d690f.tar.xz
latinime-cc2751ba03fad6af5da0a7b5d421963e040d690f.zip
Make commitCurrentAutoCorrection asynchronous.
Change-Id: Ida230ca4243347fb3ab9fda7de3a9a18f886cd1c
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputTestsBase.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
index 0a1c4e963..da1fb6f0d 100644
--- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
@@ -44,10 +44,12 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
private static final String PREF_DEBUG_MODE = "debug_mode";
- // The message that sets the underline is posted with a 100 ms delay
+ // The message that sets the underline is posted with a 200 ms delay
protected static final int DELAY_TO_WAIT_FOR_UNDERLINE = 200;
- // The message that sets predictions is posted with a 100 ms delay
+ // The message that sets predictions is posted with a 200 ms delay
protected static final int DELAY_TO_WAIT_FOR_PREDICTIONS = 200;
+ // The message that sets auto-corrections is posted within a 100 ms delay.
+ protected static final int DELAY_TO_WAIT_FOR_AUTOCORRECTION = 100;
protected LatinIME mLatinIME;
protected Keyboard mKeyboard;
@@ -221,6 +223,7 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
protected void type(final String stringToType) {
for (int i = 0; i < stringToType.length(); i = stringToType.offsetByCodePoints(i, 1)) {
type(stringToType.codePointAt(i));
+ sleep(DELAY_TO_WAIT_FOR_AUTOCORRECTION);
}
}