From 17e569c9df725c47d9b7a164d13197a1511fbdf2 Mon Sep 17 00:00:00 2001 From: "ajith.v" Date: Thu, 28 Aug 2014 11:37:58 -0700 Subject: 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} --- .../chromium/content/browser/input/ImeTest.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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); -- cgit v1.1