diff options
author | 2012-11-19 17:02:47 +0900 | |
---|---|---|
committer | 2012-11-19 17:48:19 +0900 | |
commit | c5653daf72aefde36321de8567ede6a3c60b5621 (patch) | |
tree | ff519d0354712f364f90f65370c49bf8ffcf4b34 /tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java | |
parent | 66cee1f92de0413756b8f306275d3508cd2b040f (diff) | |
download | latinime-c5653daf72aefde36321de8567ede6a3c60b5621.tar.gz latinime-c5653daf72aefde36321de8567ede6a3c60b5621.tar.xz latinime-c5653daf72aefde36321de8567ede6a3c60b5621.zip |
Correctly add double quote to the space strippers
...without removing space, this time.
Also add a test to make sure it is working.
Bug: 7531719
Change-Id: I3afcc433c6cdc2774e7deeb6d358356db5035d35
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java b/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java index a9947c1bd..03310c88b 100644 --- a/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java +++ b/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java @@ -104,4 +104,20 @@ public class BlueUnderlineTests extends InputTestsBase { final SpanGetter span = new SpanGetter(mTextView.getText(), SuggestionSpan.class); assertNull("blue underline removed when cursor is moved", span.mSpan); } + + public void testComposingStopsOnSpace() { + final String STRING_TO_TYPE = "this "; + type(STRING_TO_TYPE); + sleep(DELAY_TO_WAIT_FOR_UNDERLINE); + // Simulate the onUpdateSelection() event + mLatinIME.onUpdateSelection(0, 0, STRING_TO_TYPE.length(), STRING_TO_TYPE.length(), -1, -1); + runMessages(); + // 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); + assertNull("should not be composing, so should not have an underline span", span.mSpan); + span = new SpanGetter(mTextView.getText(), SuggestionSpan.class); + assertNull("should not be composing, so should not have an underline span", span.mSpan); + } } |