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

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

Issue 2471283003: Re-enabling tests that seem to not be flaky (Closed)
Patch Set: Disabled bug and fixed a potential race condition 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
« 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/ContentViewCoreSelectionTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java
index 931e88d4d3fe99b5c4ca7594846edf06c299e348..77a8fe045c26e5675288a47f564429745995ec17 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java
@@ -145,11 +145,8 @@ public class ContentViewCoreSelectionTest extends ContentShellTestBase {
waitForPastePopupStatus(false);
}
- /*
@SmallTest
@Feature({"TextInput"})
- */
- @DisabledTest(message = "https://crbug.com/592428")
public void testPastePopupClearedOnTappingEmptyInput() throws Throwable {
copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(this, mContentViewCore, "empty_input_text");
@@ -158,11 +155,8 @@ public class ContentViewCoreSelectionTest extends ContentShellTestBase {
waitForPastePopupStatus(false);
}
- /*
@SmallTest
@Feature({"TextInput"})
- */
- @DisabledTest(message = "https://crbug.com/592428")
public void testPastePopupClearedOnTappingNonEmptyInput() throws Throwable {
copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(this, mContentViewCore, "empty_input_text");
@@ -171,11 +165,8 @@ public class ContentViewCoreSelectionTest extends ContentShellTestBase {
waitForPastePopupStatus(false);
}
- /*
@SmallTest
@Feature({"TextInput"})
- */
- @DisabledTest(message = "https://crbug.com/592428")
public void testPastePopupClearedOnTappingOutsideInput() throws Throwable {
copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(this, mContentViewCore, "empty_input_text");
@@ -184,11 +175,8 @@ public class ContentViewCoreSelectionTest extends ContentShellTestBase {
waitForPastePopupStatus(false);
}
- /*
@SmallTest
@Feature({"TextInput"})
- */
- @DisabledTest(message = "https://crbug.com/592428")
public void testPastePopupClearedOnLongPressingOutsideInput() throws Throwable {
copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(this, mContentViewCore, "empty_input_text");
@@ -197,19 +185,16 @@ public class ContentViewCoreSelectionTest extends ContentShellTestBase {
waitForPastePopupStatus(false);
}
- /*
@SmallTest
@Feature({"TextInput"})
- */
- @DisabledTest(message = "https://crbug.com/592428")
public void testPastePopupNotShownOnLongPressingDisabledInput() throws Throwable {
copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(this, mContentViewCore, "empty_input_text");
waitForPastePopupStatus(true);
- assertTrue(mContentViewCore.hasInsertion());
+ waitForInsertion(true);
DOMUtils.longPressNode(this, mContentViewCore, "disabled_text");
waitForPastePopupStatus(false);
- assertFalse(mContentViewCore.hasInsertion());
+ waitForInsertion(false);
}
/*
@@ -740,4 +725,13 @@ public class ContentViewCoreSelectionTest extends ContentShellTestBase {
}
}));
}
+
+ private void waitForInsertion(final boolean show) throws InterruptedException {
+ CriteriaHelper.pollUiThread(Criteria.equals(show, new Callable<Boolean>() {
+ @Override
+ public Boolean call() {
+ return mContentViewCore.hasInsertion();
+ }
+ }));
+ }
}
« 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