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..9048bfe44f30434799d4654c340c9f3c9d581fc4 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); |
+ 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); |