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

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

Issue 1877073003: Respect the order of input messages from browser to renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 7 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
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 b1f13c08575d5a860054f159e2fcaf2d4d6f94e4..cde33c95714a6c477ad1827409a718d8af127a75 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
@@ -1186,6 +1186,30 @@ public class ImeTest extends ContentShellTestBase {
assertEquals("ab", getTextBeforeCursor(10, 0));
}
+ // Tests that the method call order is kept.
+ // See crbug.com/601707 for details.
+ @MediumTest
+ @Feature({"TextInput"})
+ public void testSetSelectionCommitTextOrder() throws Exception {
+ final ChromiumBaseInputConnection connection = mConnection;
+ runBlockingOnImeThread(new Callable<Void>() {
+ @Override
+ public Void call() {
+ connection.beginBatchEdit();
+ connection.commitText("hello world", 1);
+ connection.setSelection(6, 6);
+ connection.deleteSurroundingText(0, 5);
+ connection.commitText("'", 1);
+ connection.commitText("world", 1);
+ connection.setSelection(7, 7);
+ connection.setComposingText("", 1);
+ connection.endBatchEdit();
+ return null;
+ }
+ });
+ waitAndVerifyUpdateSelection(0, 7, 7, -1, -1);
+ }
+
private void performGo(TestCallbackHelperContainer testCallbackHelperContainer)
throws Throwable {
final InputConnection inputConnection = mConnection;

Powered by Google App Engine
This is Rietveld 408576698