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 2c6b42e2334d0ba34f7d6e5f8f02d4438b173a74..f1bf4b6484f348d8f8e839717145bfcd4555819c 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 |
@@ -1261,37 +1261,41 @@ public class ImeTest extends ContentShellTestBase { |
@MediumTest |
@Feature({"TextInput"}) |
@RetryOnFailure |
- public void testContentEditableEvents_SetComposingText() throws Throwable { |
+ public void testContentEditableEvents_ComposingText() throws Throwable { |
focusElementAndWaitForStateUpdate("contenteditable_event"); |
waitForEventLogs("selectionchange,selectionchange"); |
clearEventLogs(); |
- beginBatchEdit(); |
setComposingText("a", 1); |
- finishComposingText(); |
- endBatchEdit(); |
- waitAndVerifyUpdateSelection(0, 1, 1, -1, -1); |
- |
- // TODO(changwan): reduce the number of selection changes |
+ waitAndVerifyUpdateSelection(0, 1, 1, 0, 1); |
+ // TODO(changwan): reduce the number of selection changes. |
waitForEventLogs("keydown(229),compositionstart(),compositionupdate(a),input,keyup(229)," |
- + "compositionupdate(a),input,compositionend(a),selectionchange,selectionchange," |
- + "selectionchange,selectionchange,selectionchange"); |
+ + "selectionchange,selectionchange"); |
+ clearEventLogs(); |
+ |
+ finishComposingText(); |
+ waitAndVerifyUpdateSelection(1, 1, 1, -1, -1); |
+ // TODO(changwan): reduce the number of selection changes. |
+ waitForEventLogs( |
+ "compositionupdate(a),input,compositionend(a),selectionchange,selectionchange"); |
} |
@MediumTest |
@Feature({"TextInput"}) |
@RetryOnFailure |
- public void testInputTextEvents_SetComposingText() throws Throwable { |
- beginBatchEdit(); |
+ public void testInputTextEvents_ComposingText() throws Throwable { |
setComposingText("a", 1); |
- finishComposingText(); |
- endBatchEdit(); |
- waitAndVerifyUpdateSelection(0, 1, 1, -1, -1); |
- |
- // TODO(changwan): reduce the number of selection changes |
+ waitAndVerifyUpdateSelection(0, 1, 1, 0, 1); |
+ // TODO(changwan): reduce the number of selection changes. |
waitForEventLogs("keydown(229),compositionstart(),compositionupdate(a)," |
- + "input,keyup(229),compositionupdate(a),input,compositionend(a),selectionchange," |
- + "selectionchange,selectionchange,selectionchange,selectionchange"); |
+ + "input,keyup(229),selectionchange,selectionchange"); |
+ clearEventLogs(); |
+ |
+ finishComposingText(); |
+ waitAndVerifyUpdateSelection(1, 1, 1, -1, -1); |
+ // TODO(changwan): reduce the number of selection changes. |
+ waitForEventLogs("compositionupdate(a),input,compositionend(a),selectionchange," |
+ + "selectionchange,selectionchange"); |
} |
@MediumTest |