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

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

Issue 2470713002: [WIP Approach 1] Straighten up input method reactivation
Patch Set: fix some tests Created 4 years, 1 month 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 132a8c9f2de3a3aa3e75e88e7f03a6c91e8be1d3..cde8eb1193e462b878b067a83e0731f078cc6d54 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
@@ -113,7 +113,7 @@ public class ImeTest extends ContentShellTestBase {
// This is not needed if onCreateInputConnection() can return correct selection range.
waitAndVerifyUpdateSelection(0, 0, 0, -1, -1);
}
- waitForKeyboardStates(1, 0, 1, new Integer[] {TextInputType.TEXT});
+ waitForKeyboardStates(1, 0, 1, new Integer[] {TextInputType.TEXT, TextInputType.TEXT});
assertEquals(0, mConnectionFactory.getOutAttrs().initialSelStart);
assertEquals(0, mConnectionFactory.getOutAttrs().initialSelEnd);
@@ -464,18 +464,14 @@ public class ImeTest extends ContentShellTestBase {
waitForKeyboardStates(2, 1, 3, new Integer[] {TextInputType.NUMBER, TextInputType.NUMBER});
focusElement("input_text");
- // showSoftInput() on input_text. restartInput() on input_number1 due to focus change,
- // and restartInput() on input_text later.
- // TODO(changwan): reduce unnecessary restart input.
- waitForKeyboardStates(3, 1, 5, new Integer[] {
- TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.NUMBER,
- TextInputType.TEXT});
+ // showSoftInput() on input_text. restartInput() on input_text.
+ waitForKeyboardStates(3, 1, 4, new Integer[] {
+ TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.TEXT});
focusElement("input_radio", false);
// hideSoftInput(), restartInput()
- waitForKeyboardStates(3, 2, 6, new Integer[] {
- TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.NUMBER,
- TextInputType.TEXT});
+ waitForKeyboardStates(3, 2, 5, new Integer[] {
+ TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.TEXT});
}
private void assertTextsAroundCursor(

Powered by Google App Engine
This is Rietveld 408576698