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

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

Issue 2741993003: Revert restartInput change off the M57 release branch. (Closed)
Patch Set: Rebase Created 3 years, 9 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 e22e5220b3da4516e0063a631a17f4d64927ecb7..ab7c2c97ac3a6d339666c4de0ac014060b0cacc2 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
@@ -437,45 +437,16 @@ public class ImeTest extends ContentShellTestBase {
focusElement("input_text");
// showSoftInput() on input_text. restartInput() on input_number1 due to focus change,
// and restartInput() on input_text later.
- waitForKeyboardStates(3, 1, 4,
- new Integer[] {TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.TEXT});
-
- resetUpdateSelectionList();
- setComposingText("a", 1);
- waitAndVerifyUpdateSelection(0, 1, 1, 0, 1);
- resetUpdateSelectionList();
-
- // JavaScript changes focus.
- String code = "(function() { "
- + "var textarea = document.getElementById('textarea');"
- + "textarea.focus();"
- + "})();";
- JavaScriptUtils.executeJavaScriptAndWaitForResult(
- getContentViewCore().getWebContents(), code);
- waitAndVerifyUpdateSelection(0, 0, 0, -1, -1);
- resetUpdateSelectionList();
-
- waitForKeyboardStates(4, 1, 5, new Integer[] {
- TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.TEXT,
- TextInputType.TEXT_AREA});
- assertEquals(0, mConnectionFactory.getOutAttrs().initialSelStart);
- assertEquals(0, mConnectionFactory.getOutAttrs().initialSelEnd);
-
- setComposingText("aa", 1);
- waitAndVerifyUpdateSelection(0, 2, 2, 0, 2);
-
- focusElement("input_text");
- waitForKeyboardStates(5, 1, 6, new Integer[] {
- TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.TEXT,
- TextInputType.TEXT_AREA, TextInputType.TEXT});
- assertEquals(1, mConnectionFactory.getOutAttrs().initialSelStart);
- assertEquals(1, mConnectionFactory.getOutAttrs().initialSelEnd);
+ // TODO(changwan): reduce unnecessary restart input.
+ waitForKeyboardStates(3, 1, 5, new Integer[] {
+ TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.NUMBER,
+ TextInputType.TEXT});
focusElement("input_radio", false);
// hideSoftInput(), restartInput()
- waitForKeyboardStates(5, 2, 7, new Integer[] {
- TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.TEXT,
- TextInputType.TEXT_AREA, TextInputType.TEXT});
+ waitForKeyboardStates(3, 2, 6, new Integer[] {
+ TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.NUMBER,
+ TextInputType.TEXT});
}
private void assertTextsAroundCursor(
@@ -1758,7 +1729,6 @@ public class ImeTest extends ContentShellTestBase {
*/
private void focusElementAndWaitForStateUpdate(String id)
throws InterruptedException, TimeoutException {
- resetUpdateSelectionList();
focusElement(id);
waitAndVerifyUpdateSelection(0, 0, 0, -1, -1);
resetUpdateSelectionList();

Powered by Google App Engine
This is Rietveld 408576698