Chromium Code Reviews| 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..4324dadb95c8cbf91b2c3c822db24c6685c2fe37 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 |
| @@ -540,6 +540,31 @@ public class ImeTest extends ContentShellTestBase { |
| assertEquals(KeyEvent.KEYCODE_H, mImeAdapter.mLastSyntheticKeyCode); |
| } |
| + @SmallTest |
| + @Feature({"TextInput", "Main"}) |
| + public void testPastePopupShowOnLongPress() throws Throwable { |
| + DOMUtils.focusNode(mContentViewCore, "input_radio"); |
| + assertWaitForKeyboardStatus(false); |
| + |
| + DOMUtils.focusNode(mContentViewCore, "input_text"); |
| + assertWaitForKeyboardStatus(true); |
| + |
| + mConnection = (TestAdapterInputConnection) getAdapterInputConnection(); |
| + |
| + 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"); |
| + PastePopupMenu pastePopup = mContentViewCore.getPastePopupForTest(); |
|
jdduke (slow)
2014/08/25 17:40:45
Don't you need to wait here? I'm not sure that DOM
raghu
2014/08/26 07:23:31
Done.
|
| + assertTrue(pastePopup.isShowing()); |
| + } |
| + |
| private void performGo(final AdapterInputConnection inputConnection, |
| TestCallbackHelperContainer testCallbackHelperContainer) throws Throwable { |
| handleBlockingCallbackAction( |