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

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: Removed few move unwanted line breaks 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 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(
« 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