Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java

Issue 499393002: Set the Insertion handle correctly while showing the paste popup menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added wait for the long press event to respond in the unit test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4733bdd1db9553038cd63aa00fb9a4af720492c2 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,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.focusNode(mContentViewCore, "input_radio");
+ DOMUtils.longPressNode(this, mContentViewCore, "input_text");
+ PastePopupMenu pastePopup = mContentViewCore.getPastePopupForTest();
+ assertWaitForKeyboardStatus(false);
jdduke (slow) 2014/08/26 15:06:43 I don't think this is the right wait condition. Th
raghu 2014/08/26 15:45:56 Cut doesnt hide the keyboard. Also in this test si
jdduke (slow) 2014/08/26 16:01:22 If the keyboard status doesn't change, why are you
raghu 2014/08/27 05:06:42 Done.
+ assertTrue(pastePopup.isShowing());
+ }
+
private void performGo(final AdapterInputConnection inputConnection,
TestCallbackHelperContainer testCallbackHelperContainer) throws Throwable {
handleBlockingCallbackAction(
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698