Merge "Clean-up follow-up to I3ecc8496"

main
Jean Chalard 2014-02-13 10:26:48 +00:00 committed by Android (Google) Code Review
commit 5dc0d405b4
1 changed files with 5 additions and 5 deletions

View File

@ -50,8 +50,7 @@ public class BlueUnderlineTests extends InputTestsBase {
final SpanGetter spanBefore = new SpanGetter(mEditText.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 start", EXPECTED_SPAN_START, spanBefore.mStart);
assertEquals("extend blue underline, span end", EXPECTED_SPAN_END, spanBefore.mEnd); assertEquals("extend blue underline, span end", EXPECTED_SPAN_END, spanBefore.mEnd);
assertEquals("extend blue underline, span color", true, assertTrue("extend blue underline, span color", spanBefore.isAutoCorrectionIndicator());
spanBefore.isAutoCorrectionIndicator());
sleep(DELAY_TO_WAIT_FOR_UNDERLINE); sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages(); runMessages();
// Now we have been able to re-evaluate the word, there shouldn't be an auto-correction span // Now we have been able to re-evaluate the word, there shouldn't be an auto-correction span
@ -80,8 +79,8 @@ public class BlueUnderlineTests extends InputTestsBase {
sleep(DELAY_TO_WAIT_FOR_UNDERLINE); sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages(); runMessages();
final SpanGetter suggestionSpan = new SpanGetter(mEditText.getText(), SuggestionSpan.class); final SpanGetter suggestionSpan = new SpanGetter(mEditText.getText(), SuggestionSpan.class);
assertFalse("show no blue underline after backspace, span start should be -1", assertFalse("show no blue underline after backspace, span should not be the auto-"
suggestionSpan.isAutoCorrectionIndicator()); + "correction indicator", suggestionSpan.isAutoCorrectionIndicator());
final SpanGetter underlineSpan = new SpanGetter(mEditText.getText(), UnderlineSpan.class); final SpanGetter underlineSpan = new SpanGetter(mEditText.getText(), UnderlineSpan.class);
assertEquals("should be composing, so should have an underline span", assertEquals("should be composing, so should have an underline span",
EXPECTED_UNDERLINE_SPAN_START, underlineSpan.mStart); EXPECTED_UNDERLINE_SPAN_START, underlineSpan.mStart);
@ -107,7 +106,8 @@ public class BlueUnderlineTests extends InputTestsBase {
sleep(DELAY_TO_WAIT_FOR_UNDERLINE); sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages(); runMessages();
final SpanGetter span = new SpanGetter(mEditText.getText(), SuggestionSpan.class); final SpanGetter span = new SpanGetter(mEditText.getText(), SuggestionSpan.class);
assertNull("blue underline removed when cursor is moved", span.mSpan); assertFalse("blue underline removed when cursor is moved",
span.isAutoCorrectionIndicator());
} }
public void testComposingStopsOnSpace() { public void testComposingStopsOnSpace() {