summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorajith.v <ajith.v@samsung.com>2014-08-27 15:28:29 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-27 22:32:37 +0000
commit5818759b61597b65661e521b80eead8448921bb8 (patch)
tree880ec4ae6a9daa1d502b61396ac59a636c665466 /content
parent93eddfdc3d46fc6e3330e4a987e6e110f703533b (diff)
downloadchromium_src-5818759b61597b65661e521b80eead8448921bb8.zip
chromium_src-5818759b61597b65661e521b80eead8448921bb8.tar.gz
chromium_src-5818759b61597b65661e521b80eead8448921bb8.tar.bz2
[Android] Add unit tests for SelectActionBar appearance
The SelectActionBar currently lacks test coverage. Add several test cases covering the appearance of the bar when interacting with an input field. Review URL: https://codereview.chromium.org/506423003 Cr-Commit-Position: refs/heads/master@{#292248}
Diffstat (limited to 'content')
-rw-r--r--content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java23
1 files changed, 23 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 ffd4241..fdef787 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
@@ -207,6 +207,29 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ public void testSelectActionBarClearedOnTappingInput() throws Exception {
+ commitText(mConnection, "Sample Text", 1);
+ DOMUtils.longPressNode(this, mContentViewCore, "input_text");
+ assertWaitForKeyboardStatus(true);
+ assertWaitForSelectActionBarStatus(true);
+ DOMUtils.clickNode(this, mContentViewCore, "input_text");
+ assertWaitForSelectActionBarStatus(false);
+ }
+
+ @SmallTest
+ @Feature({"TextInput"})
+ public void testSelectActionBarClearedOnTappingOutsideInput() throws Exception {
+ commitText(mConnection, "Sample Text", 1);
+ DOMUtils.longPressNode(this, mContentViewCore, "input_text");
+ assertWaitForKeyboardStatus(true);
+ assertWaitForSelectActionBarStatus(true);
+ DOMUtils.clickNode(this, mContentViewCore, "input_radio");
+ assertWaitForKeyboardStatus(false);
+ assertWaitForSelectActionBarStatus(false);
+ }
+
+ @SmallTest
+ @Feature({"TextInput"})
public void testImeCut() throws Exception {
commitText(mConnection, "snarful", 1);
waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 1, "snarful", 7, 7, -1, -1);