Commit 763e52f2 authored by ajith.v's avatar ajith.v Committed by Commit bot

Adding Select Action Bar Unit test case for input.

Currently not enought unit test case  is available for Select Action Bar.
This change adding useful UT for Select Action Bar with respect to input
field.

BUG=

Review URL: https://codereview.chromium.org/501383002

Cr-Commit-Position: refs/heads/master@{#291975}
parent 05399593
......@@ -172,6 +172,16 @@ public class ImeTest extends ContentShellTestBase {
assertWaitForKeyboardStatus(true);
}
@SmallTest
@Feature({"TextInput"})
public void testSelectActionBarShownOnLongPressingInput() throws Exception {
DOMUtils.longPressNode(this, mContentViewCore, "input_text");
assertWaitForSelectActionBarStatus(false);
commitText(mConnection, "Sample Text", 1);
DOMUtils.longPressNode(this, mContentViewCore, "input_text");
assertWaitForSelectActionBarStatus(true);
}
@SmallTest
@Feature({"TextInput"})
public void testImeCut() throws Exception {
......@@ -562,6 +572,16 @@ public class ImeTest extends ContentShellTestBase {
}));
}
private void assertWaitForSelectActionBarStatus(
final boolean show) throws InterruptedException {
assertTrue(CriteriaHelper.pollForCriteria(new Criteria() {
@Override
public boolean isSatisfied() {
return show == mContentViewCore.isSelectActionBarShowing();
}
}));
}
private void waitAndVerifyEditableCallback(final ArrayList<TestImeState> states,
final int index, String text, int selectionStart, int selectionEnd,
int compositionStart, int compositionEnd) throws InterruptedException {
......
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