| 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 50d0b4c68c784b8ef18f625374b31d38af68742f..a21dca6554ee2cd18832d8af1501b81435ddbf9a 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
|
| @@ -32,6 +32,8 @@ public class ContentViewCoreSelectionTest extends ContentShellTestBase {
|
| "<br/><input id=\"input_text\" type=\"text\" value=\"Sample Text\" />" +
|
| "<br/><textarea id=\"empty_textarea\" rows=\"2\" cols=\"20\"></textarea>" +
|
| "<br/><textarea id=\"textarea\" rows=\"2\" cols=\"20\">Sample Text</textarea>" +
|
| + "<br/><input id=\"readonly_text\" type=\"text\" readonly value=\"Sample Text\"/>" +
|
| + "<br/><input id=\"disabled_text\" type=\"text\" disabled value=\"Sample Text\" />" +
|
| "</form></body></html>");
|
|
|
| private ContentViewCore mContentViewCore;
|
| @@ -173,6 +175,30 @@ public class ContentViewCoreSelectionTest extends ContentShellTestBase {
|
| assertWaitForPastePopupStatus(false);
|
| }
|
|
|
| + @SmallTest
|
| + @Feature({"TextInput"})
|
| + public void testPastePopupNotShownOnLongPressingReadOnlyInput() throws Throwable {
|
| + copyStringToClipboard();
|
| + DOMUtils.longPressNode(this, mContentViewCore, "empty_input_text");
|
| + assertWaitForPastePopupStatus(true);
|
| + assertTrue(mContentViewCore.hasInsertion());
|
| + DOMUtils.longPressNode(this, mContentViewCore, "readonly_text");
|
| + assertWaitForPastePopupStatus(false);
|
| + assertFalse(mContentViewCore.hasInsertion());
|
| + }
|
| +
|
| + @SmallTest
|
| + @Feature({"TextInput"})
|
| + public void testPastePopupNotShownOnLongPressingDisabledInput() throws Throwable {
|
| + copyStringToClipboard();
|
| + DOMUtils.longPressNode(this, mContentViewCore, "empty_input_text");
|
| + assertWaitForPastePopupStatus(true);
|
| + assertTrue(mContentViewCore.hasInsertion());
|
| + DOMUtils.longPressNode(this, mContentViewCore, "disabled_text");
|
| + assertWaitForPastePopupStatus(false);
|
| + assertFalse(mContentViewCore.hasInsertion());
|
| + }
|
| +
|
| private void assertWaitForSelectActionBarVisible(
|
| final boolean visible) throws InterruptedException {
|
| assertTrue(CriteriaHelper.pollForCriteria(new Criteria() {
|
|
|