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

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

Issue 411383002: Fix composition key-code after switching to a new input field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added reset of state in a couple other places Created 6 years, 5 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/input/ImeAdapter.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 db2abf86ee4fe044c4558596138af2ace2898236..143c68194e7da9bd8a41be96510e6872ee6e7215 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
@@ -482,6 +482,29 @@ public class ImeTest extends ContentShellTestBase {
waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 3, "hello\n\n", 6, 6, -1, -1);
}
+ @SmallTest
+ @Feature({"TextInput", "Main"})
+ public void testTransitionsWhileComposingText() throws Throwable {
+ DOMUtils.focusNode(mContentViewCore, "textarea");
+ assertWaitForKeyboardStatus(true);
+
+ mConnection = (TestAdapterInputConnection) getAdapterInputConnection();
+ waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 0, "", 0, 0, -1, -1);
+
+ // H
+ expectUpdateStateCall(mConnection);
+ setComposingText(mConnection, "h", 1);
+ assertEquals(KeyEvent.KEYCODE_H, mImeAdapter.mLastSyntheticKeyCode);
+
+ // Simulate switch of input fields.
+ finishComposingText(mConnection);
+
+ // H
+ expectUpdateStateCall(mConnection);
+ setComposingText(mConnection, "h", 1);
+ assertEquals(KeyEvent.KEYCODE_H, mImeAdapter.mLastSyntheticKeyCode);
+ }
+
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/input/ImeAdapter.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698