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

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

Issue 2356723002: Fix flaky ImeTest#testImeStaysOnLongPressingDifferentNonEmptyInputs (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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 c320ccdbbe1023f9fab00c6830592edeb1d0703b..645dd4ed2b7df506d1affa941855eba4bea25b1d 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
@@ -23,7 +23,6 @@ import android.view.inputmethod.InputConnection;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.CommandLineFlags;
-import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.RetryOnFailure;
import org.chromium.content.browser.ContentViewCore;
@@ -659,20 +658,26 @@ public class ImeTest extends ContentShellTestBase {
assertWaitForKeyboardStatus(false);
}
- //@SmallTest
- //@Feature({"TextInput"})
- //@RetryOnFailure
- // Disabled, see crbug.com/646231.
- @DisabledTest
+ @SmallTest
+ @Feature({"TextInput"})
public void testImeStaysOnLongPressingDifferentNonEmptyInputs() throws Exception {
DOMUtils.focusNode(mWebContents, "input_text");
assertWaitForKeyboardStatus(true);
+
commitText("Sample Text", 1);
+ // We should wait to avoid race condition.
+ waitAndVerifyUpdateSelection(0, 11, 11, -1, -1);
+
DOMUtils.focusNode(mWebContents, "textarea");
+ waitAndVerifyUpdateSelection(1, 0, 0, -1, -1);
+
commitText("Sample Text", 1);
+ waitAndVerifyUpdateSelection(2, 11, 11, -1, -1);
+
DOMUtils.longPressNode(this, mContentViewCore, "input_text");
assertWaitForKeyboardStatus(true);
assertWaitForSelectActionBarStatus(true);
+
DOMUtils.longPressNode(this, mContentViewCore, "textarea");
assertWaitForKeyboardStatus(true);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698