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 ffd4241a1bf6dd1d4a4d4cbaa3e93064e67e37a6..1b456d94ff305310d26234406755db48b3aea335 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 |
@@ -573,6 +573,28 @@ public class ImeTest extends ContentShellTestBase { |
assertEquals(KeyEvent.KEYCODE_H, mImeAdapter.mLastSyntheticKeyCode); |
} |
+ @SmallTest |
+ @Feature({"TextInput"}) |
+ public void testPastePopupShowOnLongPress() throws Throwable { |
+ commitText(mConnection, "hello", 1); |
+ waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 1, "hello", 5, 5, -1, -1); |
+ |
+ selectAll(mImeAdapter); |
+ waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 2, "hello", 0, 5, -1, -1); |
+ |
+ cut(mImeAdapter); |
+ waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 0, "", 0, 0, -1, -1); |
+ |
+ DOMUtils.longPressNode(this, mContentViewCore, "input_text"); |
+ final PastePopupMenu pastePopup = mContentViewCore.getPastePopupForTest(); |
+ assertTrue(CriteriaHelper.pollForCriteria(new Criteria() { |
+ @Override |
+ public boolean isSatisfied() { |
+ return pastePopup.isShowing(); |
+ } |
+ })); |
+ } |
+ |
private void performGo(final AdapterInputConnection inputConnection, |
TestCallbackHelperContainer testCallbackHelperContainer) throws Throwable { |
handleBlockingCallbackAction( |