Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java

Issue 330623002: Copying text closes the keyboard and the text input gets unfocused, forcing virtual keyboard is get… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Indentations Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698