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 e63937fd94cd00c64407fe51eb113c41a9ee5cfe..8cf30bcab30ce8bba083a273cbb9979d874ac312 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 |
@@ -174,6 +174,16 @@ public class ImeTest extends ContentShellTestBase { |
@SmallTest |
@Feature({"TextInput"}) |
+ public void testSelectActionBarShownOnLongPressingInput() throws Exception { |
+ DOMUtils.longPressNode(this, mContentViewCore, "input_text"); |
+ assertWaitForSelectActionBarStatus(false); |
+ commitText(mConnection, "Sample Text", 1); |
+ DOMUtils.longPressNode(this, mContentViewCore, "input_text"); |
+ assertWaitForSelectActionBarStatus(true); |
+ } |
+ |
+ @SmallTest |
+ @Feature({"TextInput"}) |
public void testImeCut() throws Exception { |
commitText(mConnection, "snarful", 1); |
waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 1, "snarful", 7, 7, -1, -1); |
@@ -562,6 +572,16 @@ public class ImeTest extends ContentShellTestBase { |
})); |
} |
+ private void assertWaitForSelectActionBarStatus( |
+ final boolean show) throws InterruptedException { |
+ assertTrue(CriteriaHelper.pollForCriteria(new Criteria() { |
+ @Override |
+ public boolean isSatisfied() { |
+ return show == mContentViewCore.isSelectActionBarShowing(); |
+ } |
+ })); |
+ } |
+ |
private void waitAndVerifyEditableCallback(final ArrayList<TestImeState> states, |
final int index, String text, int selectionStart, int selectionEnd, |
int compositionStart, int compositionEnd) throws InterruptedException { |