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

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

Issue 2060713002: Respect the order of input messages from browser to renderer (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/common/input_messages.h ('k') | content/public/renderer/render_view.h » ('j') | 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 57f041679d297ba67260e37fce226df81d3e28c5..089cd646b9e9d1abe2c9680261e84d603ec7aa8c 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
@@ -1202,6 +1202,30 @@ public class ImeTest extends ContentShellTestBase {
}));
}
+ // 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;
« no previous file with comments | « content/common/input_messages.h ('k') | content/public/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698