Commit dc805e13 authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Re-enabling ContentViewCore SelectionTests that used to be flaky

Changes in how selection and the action mode are triggered seem to
have deflaked these tests. Each of the re-enabled tests passed
60 times on a Nexus 6P running Android O and 60 times on a Nexus 4
running Android J.

Bug: 592428

Change-Id: If774d474df13e9e20e3d714f06358811a941d075
Reviewed-on: https://chromium-review.googlesource.com/701278Reviewed-by: default avatarAlexandre Elias <aelias@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506805}
parent 771bc4ee
...@@ -125,7 +125,6 @@ public class ContentViewCoreSelectionTest { ...@@ -125,7 +125,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextSelection"}) @Feature({"TextSelection"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectionPreservedAfterLossOfFocusIfRequested() throws Throwable { public void testSelectionPreservedAfterLossOfFocusIfRequested() throws Throwable {
requestFocusOnUiThread(true); requestFocusOnUiThread(true);
...@@ -151,7 +150,6 @@ public class ContentViewCoreSelectionTest { ...@@ -151,7 +150,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextSelection"}) @Feature({"TextSelection"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectionPreservedAfterReshown() throws Throwable { public void testSelectionPreservedAfterReshown() throws Throwable {
DOMUtils.longPressNode(mContentViewCore, "textarea"); DOMUtils.longPressNode(mContentViewCore, "textarea");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -169,7 +167,6 @@ public class ContentViewCoreSelectionTest { ...@@ -169,7 +167,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextSelection"}) @Feature({"TextSelection"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectionPreservedAfterReattached() throws Throwable { public void testSelectionPreservedAfterReattached() throws Throwable {
DOMUtils.longPressNode(mContentViewCore, "textarea"); DOMUtils.longPressNode(mContentViewCore, "textarea");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -184,12 +181,9 @@ public class ContentViewCoreSelectionTest { ...@@ -184,12 +181,9 @@ public class ContentViewCoreSelectionTest {
Assert.assertTrue(mSelectionPopupController.hasSelection()); Assert.assertTrue(mSelectionPopupController.hasSelection());
} }
/* @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
*/
@Test
@DisabledTest(message = "https://crbug.com/592428")
public void testPastePopupNotShownOnLongPressingNonEmptyInput() throws Throwable { public void testPastePopupNotShownOnLongPressingNonEmptyInput() throws Throwable {
copyStringToClipboard("SampleTextToCopy"); copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(mContentViewCore, "empty_input_text"); DOMUtils.longPressNode(mContentViewCore, "empty_input_text");
...@@ -352,11 +346,9 @@ public class ContentViewCoreSelectionTest { ...@@ -352,11 +346,9 @@ public class ContentViewCoreSelectionTest {
Assert.assertEquals("Maps", returnResult.label); Assert.assertEquals("Maps", returnResult.label);
} }
/* @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
*/
@Test
@DisabledTest(message = "https://crbug.com/592428") @DisabledTest(message = "https://crbug.com/592428")
public void testPastePopupDismissedOnDestroy() throws Throwable { public void testPastePopupDismissedOnDestroy() throws Throwable {
copyStringToClipboard("SampleTextToCopy"); copyStringToClipboard("SampleTextToCopy");
...@@ -374,7 +366,6 @@ public class ContentViewCoreSelectionTest { ...@@ -374,7 +366,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testActionBarConfiguredCorrectlyForInput() throws Throwable { public void testActionBarConfiguredCorrectlyForInput() throws Throwable {
DOMUtils.longPressNode(mContentViewCore, "input_text"); DOMUtils.longPressNode(mContentViewCore, "input_text");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -387,7 +378,6 @@ public class ContentViewCoreSelectionTest { ...@@ -387,7 +378,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testActionBarConfiguredCorrectlyForPassword() throws Throwable { public void testActionBarConfiguredCorrectlyForPassword() throws Throwable {
DOMUtils.longPressNode(mContentViewCore, "password"); DOMUtils.longPressNode(mContentViewCore, "password");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -400,7 +390,6 @@ public class ContentViewCoreSelectionTest { ...@@ -400,7 +390,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testActionBarConfiguredCorrectlyForPlainText() throws Throwable { public void testActionBarConfiguredCorrectlyForPlainText() throws Throwable {
DOMUtils.longPressNode(mContentViewCore, "plain_text_1"); DOMUtils.longPressNode(mContentViewCore, "plain_text_1");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -413,7 +402,6 @@ public class ContentViewCoreSelectionTest { ...@@ -413,7 +402,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testActionBarConfiguredCorrectlyForTextArea() throws Throwable { public void testActionBarConfiguredCorrectlyForTextArea() throws Throwable {
DOMUtils.longPressNode(mContentViewCore, "textarea"); DOMUtils.longPressNode(mContentViewCore, "textarea");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -426,7 +414,6 @@ public class ContentViewCoreSelectionTest { ...@@ -426,7 +414,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarPlainTextCopy() throws Exception { public void testSelectActionBarPlainTextCopy() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "plain_text_1"); DOMUtils.longPressNode(mContentViewCore, "plain_text_1");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -439,7 +426,6 @@ public class ContentViewCoreSelectionTest { ...@@ -439,7 +426,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarInputCopy() throws Exception { public void testSelectActionBarInputCopy() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "input_text"); DOMUtils.longPressNode(mContentViewCore, "input_text");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -452,7 +438,6 @@ public class ContentViewCoreSelectionTest { ...@@ -452,7 +438,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarPasswordCopy() throws Exception { public void testSelectActionBarPasswordCopy() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "plain_text_1"); DOMUtils.longPressNode(mContentViewCore, "plain_text_1");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -473,7 +458,6 @@ public class ContentViewCoreSelectionTest { ...@@ -473,7 +458,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarTextAreaCopy() throws Exception { public void testSelectActionBarTextAreaCopy() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "textarea"); DOMUtils.longPressNode(mContentViewCore, "textarea");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -486,7 +470,6 @@ public class ContentViewCoreSelectionTest { ...@@ -486,7 +470,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextSelection"}) @Feature({"TextSelection"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarPlainTextCut() throws Throwable { public void testSelectActionBarPlainTextCut() throws Throwable {
copyStringToClipboard("SampleTextToCopy"); copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(mContentViewCore, "plain_text_1"); DOMUtils.longPressNode(mContentViewCore, "plain_text_1");
...@@ -505,7 +488,6 @@ public class ContentViewCoreSelectionTest { ...@@ -505,7 +488,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarInputCut() throws Exception { public void testSelectActionBarInputCut() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "input_text"); DOMUtils.longPressNode(mContentViewCore, "input_text");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -522,7 +504,6 @@ public class ContentViewCoreSelectionTest { ...@@ -522,7 +504,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarPasswordCut() throws Throwable { public void testSelectActionBarPasswordCut() throws Throwable {
copyStringToClipboard("SampleTextToCopy"); copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(mContentViewCore, "password"); DOMUtils.longPressNode(mContentViewCore, "password");
...@@ -540,7 +521,6 @@ public class ContentViewCoreSelectionTest { ...@@ -540,7 +521,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarTextAreaCut() throws Exception { public void testSelectActionBarTextAreaCut() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "textarea"); DOMUtils.longPressNode(mContentViewCore, "textarea");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -557,7 +537,6 @@ public class ContentViewCoreSelectionTest { ...@@ -557,7 +537,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextSelection"}) @Feature({"TextSelection"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarPlainTextSelectAll() throws Exception { public void testSelectActionBarPlainTextSelectAll() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "plain_text_1"); DOMUtils.longPressNode(mContentViewCore, "plain_text_1");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -571,7 +550,6 @@ public class ContentViewCoreSelectionTest { ...@@ -571,7 +550,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarInputSelectAll() throws Exception { public void testSelectActionBarInputSelectAll() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "input_text"); DOMUtils.longPressNode(mContentViewCore, "input_text");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -586,7 +564,6 @@ public class ContentViewCoreSelectionTest { ...@@ -586,7 +564,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarPasswordSelectAll() throws Exception { public void testSelectActionBarPasswordSelectAll() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "password"); DOMUtils.longPressNode(mContentViewCore, "password");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -600,7 +577,6 @@ public class ContentViewCoreSelectionTest { ...@@ -600,7 +577,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarTextAreaSelectAll() throws Exception { public void testSelectActionBarTextAreaSelectAll() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "textarea"); DOMUtils.longPressNode(mContentViewCore, "textarea");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
...@@ -624,11 +600,9 @@ public class ContentViewCoreSelectionTest { ...@@ -624,11 +600,9 @@ public class ContentViewCoreSelectionTest {
}); });
} }
/**
* @SmallTest
* @Feature({"TextSelection", "TextInput"})
*/
@Test @Test
@SmallTest
@Feature({"TextSelection", "TextInput"})
@DisabledTest(message = "http://crbug.com/606942") @DisabledTest(message = "http://crbug.com/606942")
public void testCursorPositionAfterHidingActionMode() throws Exception { public void testCursorPositionAfterHidingActionMode() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "textarea"); DOMUtils.longPressNode(mContentViewCore, "textarea");
...@@ -653,7 +627,6 @@ public class ContentViewCoreSelectionTest { ...@@ -653,7 +627,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextSelection"}) @Feature({"TextSelection"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarPlainTextPaste() throws Throwable { public void testSelectActionBarPlainTextPaste() throws Throwable {
copyStringToClipboard("SampleTextToCopy"); copyStringToClipboard("SampleTextToCopy");
DOMUtils.longPressNode(mContentViewCore, "plain_text_1"); DOMUtils.longPressNode(mContentViewCore, "plain_text_1");
...@@ -672,7 +645,6 @@ public class ContentViewCoreSelectionTest { ...@@ -672,7 +645,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarInputPaste() throws Throwable { public void testSelectActionBarInputPaste() throws Throwable {
copyStringToClipboard("SampleTextToCopy"); copyStringToClipboard("SampleTextToCopy");
...@@ -694,12 +666,9 @@ public class ContentViewCoreSelectionTest { ...@@ -694,12 +666,9 @@ public class ContentViewCoreSelectionTest {
Assert.assertEquals("SampleTextToCopy", mSelectionPopupController.getSelectedText()); Assert.assertEquals("SampleTextToCopy", mSelectionPopupController.getSelectedText());
} }
/* @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
*/
@Test
@DisabledTest(message = "https://crbug.com/592428")
public void testSelectActionBarPasswordPaste() throws Throwable { public void testSelectActionBarPasswordPaste() throws Throwable {
copyStringToClipboard("SamplePassword2"); copyStringToClipboard("SamplePassword2");
...@@ -748,7 +717,6 @@ public class ContentViewCoreSelectionTest { ...@@ -748,7 +717,6 @@ public class ContentViewCoreSelectionTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"TextInput"}) @Feature({"TextInput"})
@DisabledTest(message = "crbug.com/592428")
public void testSelectActionBarSearchAndShareLaunchesNewTask() throws Exception { public void testSelectActionBarSearchAndShareLaunchesNewTask() throws Exception {
DOMUtils.longPressNode(mContentViewCore, "textarea"); DOMUtils.longPressNode(mContentViewCore, "textarea");
waitForSelectActionBarVisible(true); waitForSelectActionBarVisible(true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment