Chromium Code Reviews| Index: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java |
| diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java |
| index bd9d98d808c77bb026ec0086cd8e06462f371f13..ad1fa1879dd3236b5b5276dbe4dcf07410c39fa3 100644 |
| --- a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java |
| +++ b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java |
| @@ -11,6 +11,7 @@ import android.content.Context; |
| import android.test.suitebuilder.annotation.MediumTest; |
| import android.test.suitebuilder.annotation.SmallTest; |
| import android.text.Editable; |
| +import android.text.Selection; |
| import android.text.TextUtils; |
| import android.view.KeyEvent; |
| import android.view.View; |
| @@ -144,6 +145,22 @@ public class ImeTest extends ContentShellTestBase { |
| @SmallTest |
| @Feature({"TextInput"}) |
| + public void testKeyboardNotDismissedAfterCopySelection() throws Exception { |
| + commitText(mConnection, "Sample Text", 1); |
| + waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 1, |
| + "Sample Text", 11, 11, -1, -1); |
|
Ted C
2014/06/20 16:33:57
+2 indent
Ted C
2014/06/20 19:04:33
Actually, +4 indent
AKVT
2014/06/21 07:20:13
Done.
|
| + DOMUtils.clickNode(this, mContentViewCore, "input_text"); |
| + assertWaitForKeyboardStatus(true); |
| + DOMUtils.longPressNode(this, mContentViewCore, "input_text"); |
| + selectAll(mImeAdapter); |
| + copy(mImeAdapter); |
| + assertWaitForKeyboardStatus(true); |
| + assertEquals(11, Selection.getSelectionEnd(mContentViewCore.getEditableForTest())); |
| + assertEquals(11, Selection.getSelectionEnd(mContentViewCore.getEditableForTest())); |
| + } |
| + |
| + @SmallTest |
| + @Feature({"TextInput"}) |
| public void testImeCut() throws Exception { |
| commitText(mConnection, "snarful", 1); |
| waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 1, "snarful", 7, 7, -1, -1); |