diff options
author | 2013-05-01 13:33:39 +0900 | |
---|---|---|
committer | 2013-05-01 18:21:56 +0900 | |
commit | d5781eef628c2cd4ac38029040746daa4679d637 (patch) | |
tree | 68c1ae758e67be2c46dce8daa40a085c0fcae05a /tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java | |
parent | df2eae6e69948e99618a28d087b847c70582efd8 (diff) | |
download | latinime-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/BlueUnderlineTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java b/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java index 7275d3afa..c4fd5a0c4 100644 --- a/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java +++ b/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java @@ -30,7 +30,7 @@ public class BlueUnderlineTests extends InputTestsBase { type(STRING_TO_TYPE); sleep(DELAY_TO_WAIT_FOR_UNDERLINE); runMessages(); - final SpanGetter span = new SpanGetter(mTextView.getText(), SuggestionSpan.class); + final SpanGetter span = new SpanGetter(mEditText.getText(), SuggestionSpan.class); assertEquals("show blue underline, span start", EXPECTED_SPAN_START, span.mStart); assertEquals("show blue underline, span end", EXPECTED_SPAN_END, span.mEnd); assertEquals("show blue underline, span color", true, span.isAutoCorrectionIndicator()); @@ -47,7 +47,7 @@ public class BlueUnderlineTests extends InputTestsBase { type(STRING_2_TO_TYPE); // We haven't have time to look into the dictionary yet, so the line should still be // blue to avoid any flicker. - final SpanGetter spanBefore = new SpanGetter(mTextView.getText(), SuggestionSpan.class); + final SpanGetter spanBefore = new SpanGetter(mEditText.getText(), SuggestionSpan.class); assertEquals("extend blue underline, span start", EXPECTED_SPAN_START, spanBefore.mStart); assertEquals("extend blue underline, span end", EXPECTED_SPAN_END, spanBefore.mEnd); assertEquals("extend blue underline, span color", true, @@ -55,7 +55,7 @@ public class BlueUnderlineTests extends InputTestsBase { sleep(DELAY_TO_WAIT_FOR_UNDERLINE); runMessages(); // Now we have been able to re-evaluate the word, there shouldn't be an auto-correction span - final SpanGetter spanAfter = new SpanGetter(mTextView.getText(), SuggestionSpan.class); + final SpanGetter spanAfter = new SpanGetter(mEditText.getText(), SuggestionSpan.class); assertNull("hide blue underline", spanAfter.mSpan); } @@ -76,10 +76,10 @@ public class BlueUnderlineTests extends InputTestsBase { type(Constants.CODE_DELETE); sleep(DELAY_TO_WAIT_FOR_UNDERLINE); runMessages(); - final SpanGetter suggestionSpan = new SpanGetter(mTextView.getText(), SuggestionSpan.class); + final SpanGetter suggestionSpan = new SpanGetter(mEditText.getText(), SuggestionSpan.class); assertEquals("show no blue underline after backspace, span start should be -1", EXPECTED_SUGGESTION_SPAN_START, suggestionSpan.mStart); - final SpanGetter underlineSpan = new SpanGetter(mTextView.getText(), UnderlineSpan.class); + final SpanGetter underlineSpan = new SpanGetter(mEditText.getText(), UnderlineSpan.class); assertEquals("should be composing, so should have an underline span", EXPECTED_UNDERLINE_SPAN_START, underlineSpan.mStart); assertEquals("should be composing, so should have an underline span", @@ -103,7 +103,7 @@ public class BlueUnderlineTests extends InputTestsBase { NEW_CURSOR_POSITION, NEW_CURSOR_POSITION, -1, -1); sleep(DELAY_TO_WAIT_FOR_UNDERLINE); runMessages(); - final SpanGetter span = new SpanGetter(mTextView.getText(), SuggestionSpan.class); + final SpanGetter span = new SpanGetter(mEditText.getText(), SuggestionSpan.class); assertNull("blue underline removed when cursor is moved", span.mSpan); } @@ -117,7 +117,7 @@ public class BlueUnderlineTests extends InputTestsBase { // Here the blue underline has been set. testBlueUnderline() is testing for this already, // so let's not test it here again. // Now simulate the user moving the cursor. - SpanGetter span = new SpanGetter(mTextView.getText(), UnderlineSpan.class); + SpanGetter span = new SpanGetter(mEditText.getText(), UnderlineSpan.class); assertNull("should not be composing, so should not have an underline span", span.mSpan); } } |