| 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();
|
| + }
|
| + }));
|
| + }
|
| }
|
|
|