summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajith.v <ajith.v@samsung.com>2014-08-28 11:37:58 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-28 18:50:58 +0000
commit17e569c9df725c47d9b7a164d13197a1511fbdf2 (patch)
tree7eed980b82a80c75fc8dc63df55edb6a70951be2
parentedde24b3815fdbc888c675fb24cb21a25186c989 (diff)
downloadchromium_src-17e569c9df725c47d9b7a164d13197a1511fbdf2.zip
chromium_src-17e569c9df725c47d9b7a164d13197a1511fbdf2.tar.gz
chromium_src-17e569c9df725c47d9b7a164d13197a1511fbdf2.tar.bz2
Added missing test cases related to long pressing on input field.
IME Visibility status check test case is missing when we do long press on different kind of empty and non-empty input fields. This patch takes care of adding missing test cases for the same. BUG= Review URL: https://codereview.chromium.org/516843005 Cr-Commit-Position: refs/heads/master@{#292423}
-rw-r--r--content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java24
1 files changed, 24 insertions, 0 deletions
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 fc5643c..c6e54ba 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
@@ -220,6 +220,30 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ public void testImeNotShownOnLongPressingDifferentEmptyInputs() throws Exception {
+ DOMUtils.focusNode(mContentViewCore, "input_radio");
+ DOMUtils.longPressNode(this, mContentViewCore, "input_text");
+ assertWaitForKeyboardStatus(false);
+ DOMUtils.longPressNode(this, mContentViewCore, "textarea");
+ assertWaitForKeyboardStatus(false);
+ }
+
+ @SmallTest
+ @Feature({"TextInput"})
+ public void testImeStaysOnLongPressingDifferentNonEmptyInputs() throws Exception {
+ DOMUtils.focusNode(mContentViewCore, "input_text");
+ assertWaitForKeyboardStatus(true);
+ commitText(mConnection, "Sample Text", 1);
+ DOMUtils.focusNode(mContentViewCore, "textarea");
+ commitText(mConnection, "Sample Text", 1);
+ DOMUtils.longPressNode(this, mContentViewCore, "input_text");
+ assertWaitForKeyboardStatus(true);
+ DOMUtils.longPressNode(this, mContentViewCore, "textarea");
+ assertWaitForKeyboardStatus(true);
+ }
+
+ @SmallTest
+ @Feature({"TextInput"})
public void testImeCut() throws Exception {
commitText(mConnection, "snarful", 1);
waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 1, "snarful", 7, 7, -1, -1);