aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java14
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 a9947c1bd..02047cfc4 100644
--- a/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java
+++ b/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java
@@ -16,8 +16,6 @@
package com.android.inputmethod.latin;
-import com.android.inputmethod.keyboard.Keyboard;
-
import android.text.style.SuggestionSpan;
import android.text.style.UnderlineSpan;
@@ -67,13 +65,13 @@ public class BlueUnderlineTests extends InputTestsBase {
type(STRING_TO_TYPE);
sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages();
- type(Keyboard.CODE_SPACE);
+ type(Constants.CODE_SPACE);
sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages();
- type(Keyboard.CODE_DELETE);
+ type(Constants.CODE_DELETE);
sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages();
- type(Keyboard.CODE_DELETE);
+ type(Constants.CODE_DELETE);
sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages();
final SpanGetter suggestionSpan = new SpanGetter(mTextView.getText(), SuggestionSpan.class);
@@ -88,17 +86,19 @@ public class BlueUnderlineTests extends InputTestsBase {
public void testBlueUnderlineDisappearsWhenCursorMoved() {
final String STRING_TO_TYPE = "tgis";
+ final int typedLength = STRING_TO_TYPE.length();
final int NEW_CURSOR_POSITION = 0;
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);
+ mLatinIME.onUpdateSelection(0, 0, typedLength, typedLength, -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.
mInputConnection.setSelection(NEW_CURSOR_POSITION, NEW_CURSOR_POSITION);
- mLatinIME.onUpdateSelection(0, 0, NEW_CURSOR_POSITION, NEW_CURSOR_POSITION, -1, -1);
+ mLatinIME.onUpdateSelection(typedLength, typedLength,
+ NEW_CURSOR_POSITION, NEW_CURSOR_POSITION, -1, -1);
sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages();
final SpanGetter span = new SpanGetter(mTextView.getText(), SuggestionSpan.class);