aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-05-01 13:33:39 +0900
committerSatoshi Kataoka <satok@google.com>2013-05-01 18:21:56 +0900
commitd5781eef628c2cd4ac38029040746daa4679d637 (patch)
tree68c1ae758e67be2c46dce8daa40a085c0fcae05a /tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java
parentdf2eae6e69948e99618a28d087b847c70582efd8 (diff)
downloadlatinime-d5781eef628c2cd4ac38029040746daa4679d637.tar.gz
latinime-d5781eef628c2cd4ac38029040746daa4679d637.tar.xz
latinime-d5781eef628c2cd4ac38029040746daa4679d637.zip
Fix Google spell checker tests
Bug: 8613307 Change-Id: Ief04a4abb6dc1f79660a2e419c9c5e271802b5a1
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java b/tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java
index 879cc4664..995d7f07b 100644
--- a/tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java
+++ b/tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java
@@ -24,14 +24,15 @@ import com.android.inputmethod.latin.InputTestsBase;
@LargeTest
public class AndroidSpellCheckerServiceTest extends InputTestsBase {
public void testSpellchecker() {
- mTextView.onAttachedToWindow();
- mTextView.setText("tgis");
- type(" ");
+ changeLanguage("en_US");
+ mEditText.setText("tgis ");
+ mEditText.setSelection(mEditText.getText().length());
+ mEditText.onAttachedToWindow();
sleep(1000);
runMessages();
sleep(1000);
- final SpanGetter span = new SpanGetter(mTextView.getText(), SuggestionSpan.class);
+ final SpanGetter span = new SpanGetter(mEditText.getText(), SuggestionSpan.class);
// If no span, the following will crash
final String[] suggestions = span.getSuggestions();
// For this test we consider "tgis" should yield at least 2 suggestions (at this moment
@@ -43,14 +44,15 @@ public class AndroidSpellCheckerServiceTest extends InputTestsBase {
public void testRussianSpellchecker() {
changeLanguage("ru");
- mTextView.onAttachedToWindow();
- mTextView.setText("годп");
- type(" ");
+ mEditText.onAttachedToWindow();
+ mEditText.setText("годп ");
+ mEditText.setSelection(mEditText.getText().length());
+ mEditText.onAttachedToWindow();
sleep(1000);
runMessages();
sleep(1000);
- final SpanGetter span = new SpanGetter(mTextView.getText(), SuggestionSpan.class);
+ final SpanGetter span = new SpanGetter(mEditText.getText(), SuggestionSpan.class);
// If no span, the following will crash
final String[] suggestions = span.getSuggestions();
// For this test we consider "годп" should yield at least 2 suggestions (at this moment