aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-01-25 22:39:38 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-25 22:39:38 -0800
commitd3d0d4196c83d9ff764bfe312ec8d1ee6c274a46 (patch)
treea56bf1af768ba8debf27f116d9391b2d0363ff6e /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parentc400482d176f41ce8d750d7f99f94d96eb1d724e (diff)
parent41df8a98fd0b89de87c7531903262c75dc7e505b (diff)
downloadlatinime-d3d0d4196c83d9ff764bfe312ec8d1ee6c274a46.tar.gz
latinime-d3d0d4196c83d9ff764bfe312ec8d1ee6c274a46.tar.xz
latinime-d3d0d4196c83d9ff764bfe312ec8d1ee6c274a46.zip
am 41df8a98: Add a test case for backspace at start of line
* commit '41df8a98fd0b89de87c7531903262c75dc7e505b': Add a test case for backspace at start of line
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputLogicTests.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
index 7b87be6d3..8b4f64aa1 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
@@ -191,5 +191,17 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> {
type(STRING_TO_TYPE);
type(Keyboard.CODE_DELETE);
assertEquals("double space make a period", EXPECTED_RESULT, mTextView.getText().toString());
+
+ public void testBackspaceAtStartAfterAutocorrect() {
+ final String STRING_TO_TYPE = "tgis ";
+ final String EXPECTED_RESULT = "this ";
+ final int NEW_CURSOR_POSITION = 0;
+ type(STRING_TO_TYPE);
+ mLatinIME.onUpdateSelection(0, 0, STRING_TO_TYPE.length(), STRING_TO_TYPE.length(), -1, -1);
+ mInputConnection.setSelection(NEW_CURSOR_POSITION, NEW_CURSOR_POSITION);
+ mLatinIME.onUpdateSelection(0, 0, NEW_CURSOR_POSITION, NEW_CURSOR_POSITION, -1, -1);
+ type(Keyboard.CODE_DELETE);
+ assertEquals("auto correct then move curor to start of line then backspace",
+ EXPECTED_RESULT, mTextView.getText().toString());
}
}