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

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: Test function modified. 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
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);

Powered by Google App Engine
This is Rietveld 408576698