aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-25 21:43:23 +0900
committerJean Chalard <jchalard@google.com>2013-12-27 22:40:19 +0900
commit1e50c681af56dd77d97a1e6d463f1e3023c1a69b (patch)
tree79e180a0267557abb2313bddc90e20b2d27faa05 /tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java
parent8ce921dd6ba5c63a2dc44b7578a3587aa7dc75c7 (diff)
downloadlatinime-1e50c681af56dd77d97a1e6d463f1e3023c1a69b.tar.gz
latinime-1e50c681af56dd77d97a1e6d463f1e3023c1a69b.tar.xz
latinime-1e50c681af56dd77d97a1e6d463f1e3023c1a69b.zip
[IL52] Remove a useless method.
This old method doesn't even re-read the old suggestions. It used to recompute them without the coordinates. Re-using the recorrection code, which is much more advanced, is the right thing to do here. Also, refining the test. It's no use trying to resume suggestion if we don't have a suggestion strip, since we aren't going to auto-correct anything anyway. Not the motivation for this change, but this also fixes Bug: 11620256 Change-Id: Id49efa32e293c49837c61fdc752c86bbac1d2c88
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java b/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java
index c4fd5a0c4..cdd8f6b85 100644
--- a/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java
+++ b/tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java
@@ -61,6 +61,7 @@ public class BlueUnderlineTests extends InputTestsBase {
public void testBlueUnderlineOnBackspace() {
final String STRING_TO_TYPE = "tgis";
+ final int typedLength = STRING_TO_TYPE.length();
final int EXPECTED_SUGGESTION_SPAN_START = -1;
final int EXPECTED_UNDERLINE_SPAN_START = 0;
final int EXPECTED_UNDERLINE_SPAN_END = 4;
@@ -68,6 +69,8 @@ public class BlueUnderlineTests extends InputTestsBase {
sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages();
type(Constants.CODE_SPACE);
+ // typedLength + 1 because we also typed a space
+ mLatinIME.onUpdateSelection(0, 0, typedLength + 1, typedLength + 1, -1, -1);
sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
runMessages();
type(Constants.CODE_DELETE);