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

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

Issue 2323993002: Mark flaky content tests with @RetryOnFailure (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
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 c931600cd206190a7f6b75ae2c69beb930b47502..2e8fe8fe70130c7f061bb3cc04cd94440955b7c3 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
@@ -24,6 +24,7 @@ import android.view.inputmethod.InputConnection;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Feature;
+import org.chromium.base.test.util.RetryOnFailure;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper;
@@ -107,6 +108,7 @@ public class ImeTest extends ContentShellTestBase {
@MediumTest
@Feature({"TextInput", "Main"})
+ @RetryOnFailure
public void testDoesNotHang_getTextAfterKeyboardHides() throws Throwable {
setComposingText("hello", 1);
waitAndVerifyUpdateSelection(0, 5, 5, 0, 5);
@@ -265,6 +267,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testImeCopy() throws Exception {
commitText("hello", 1);
waitAndVerifyUpdateSelection(0, 5, 5, -1, -1);
@@ -291,6 +294,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testShowAndHideSoftInput() throws Exception {
focusElement("input_radio", false);
@@ -383,6 +387,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testKeyboardNotDismissedAfterCopySelection() throws Exception {
commitText("Sample Text", 1);
waitAndVerifyUpdateSelection(0, 11, 11, -1, -1);
@@ -401,6 +406,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testImeNotDismissedAfterCutSelection() throws Exception {
commitText("Sample Text", 1);
waitAndVerifyUpdateSelection(0, 11, 11, -1, -1);
@@ -435,6 +441,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testLongPressInputWhileComposingText() throws Exception {
assertWaitForSelectActionBarStatus(false);
setComposingText("Sample Text", 1);
@@ -456,6 +463,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testImeShownWhenLongPressOnAlreadySelectedText() throws Exception {
assertWaitForSelectActionBarStatus(false);
commitText("Sample Text", 1);
@@ -518,6 +526,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testPhysicalKeyboard_AttachDetach() throws Exception {
attachPhysicalKeyboard();
// We still call showSoftKeyboard, which will be ignored by physical keyboard.
@@ -564,6 +573,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testSelectActionBarClearedOnTappingOutsideInput() throws Exception {
commitText("Sample Text", 1);
DOMUtils.longPressNode(this, mContentViewCore, "input_text");
@@ -586,6 +596,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testImeStaysOnLongPressingDifferentNonEmptyInputs() throws Exception {
DOMUtils.focusNode(mWebContents, "input_text");
assertWaitForKeyboardStatus(true);
@@ -653,6 +664,7 @@ public class ImeTest extends ContentShellTestBase {
@CommandLineFlags.Add("enable-features=ImeThread")
@MediumTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testPasteLongText() throws Exception {
int textLength = 25000;
String text = new String(new char[textLength]).replace("\0", "a");
@@ -697,6 +709,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput", "Main"})
+ @RetryOnFailure
public void testShowImeIfNeeded() throws Throwable {
// showImeIfNeeded() is now implicitly called by the updated focus
// heuristic so no need to call explicitly. http://crbug.com/371927
@@ -709,6 +722,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput", "Main"})
+ @RetryOnFailure
public void testFinishComposingText() throws Throwable {
focusElementAndWaitForStateUpdate("textarea");
@@ -808,6 +822,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput", "Main"})
+ @RetryOnFailure
public void testDeleteMultiCharacterCodepoint() throws Throwable {
// This smiley is a multi character codepoint.
final String smiley = "\uD83D\uDE0A";
@@ -852,6 +867,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput", "Main"})
+ @RetryOnFailure
public void testRepeatBackspaceKeycode() throws Throwable {
focusElement("textarea");
@@ -1097,6 +1113,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testPastePopupShowAndHide() throws Throwable {
commitText("hello", 1);
waitAndVerifyUpdateSelection(0, 5, 5, -1, -1);
@@ -1168,6 +1185,7 @@ public class ImeTest extends ContentShellTestBase {
@MediumTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testRestartInputKeepsTextAndCursor() throws Exception {
commitText("ab", 2);
restartInput();
@@ -1176,6 +1194,7 @@ public class ImeTest extends ContentShellTestBase {
@MediumTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testContentEditableEvents_SetComposingText() throws Throwable {
focusElementAndWaitForStateUpdate("contenteditable_event");
waitForEventLogs("selectionchange,selectionchange");
@@ -1195,6 +1214,7 @@ public class ImeTest extends ContentShellTestBase {
@MediumTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testInputTextEvents_SetComposingText() throws Throwable {
beginBatchEdit();
setComposingText("a", 1);
@@ -1250,6 +1270,7 @@ public class ImeTest extends ContentShellTestBase {
@MediumTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testInputTextEvents_DeleteSurroundingText() throws Throwable {
commitText("a", 1);
waitAndVerifyUpdateSelection(0, 1, 1, -1, -1);
@@ -1315,6 +1336,7 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput"})
@CommandLineFlags.Add("enable-features=ImeThread")
+ @RetryOnFailure
public void testCastToBaseInputConnection() throws Exception {
commitText("a", 1);
final BaseInputConnection baseInputConnection = (BaseInputConnection) mConnection;
@@ -1330,6 +1352,7 @@ public class ImeTest extends ContentShellTestBase {
// See crbug.com/601707 for details.
@MediumTest
@Feature({"TextInput"})
+ @RetryOnFailure
public void testSetSelectionCommitTextOrder() throws Exception {
final ChromiumBaseInputConnection connection = mConnection;
runBlockingOnImeThread(new Callable<Void>() {

Powered by Google App Engine
This is Rietveld 408576698