aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputTestsBase.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-12 23:31:27 +0900
committerJean Chalard <jchalard@google.com>2014-02-12 23:32:51 +0900
commitbac89ecc508052161704ef02c26e4e1d4d5060fa (patch)
tree43d3698402ffb0e5bf2208fc1b5d8f70daf8ff7c /tests/src/com/android/inputmethod/latin/InputTestsBase.java
parent5a885e85c2df89247ccdde50fe26ca46438727fb (diff)
downloadlatinime-bac89ecc508052161704ef02c26e4e1d4d5060fa.tar.gz
latinime-bac89ecc508052161704ef02c26e4e1d4d5060fa.tar.xz
latinime-bac89ecc508052161704ef02c26e4e1d4d5060fa.zip
Fix a failing test.
A replay of that old, horribly hard-to-find bug: we post a resume message during onStartInputView, so we need to process it before we start the test. But now the message is posted with a delay, so we need to wait for the delay... Change-Id: I843d70e636fa51a68aadbdbbaa73b1711ad7bddd
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputTestsBase.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
index b267bc5da..fb6bda70b 100644
--- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
@@ -202,7 +202,9 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
mInputConnection = ic;
changeLanguage("en_US");
// Run messages to avoid the messages enqueued by startInputView() and its friends
- // to run on a later call and ruin things.
+ // to run on a later call and ruin things. We need to wait first because some of them
+ // can be posted with a delay (notably, MSG_RESUME_SUGGESTIONS)
+ sleep(DELAY_TO_WAIT_FOR_PREDICTIONS);
runMessages();
}