Index: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java |
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java |
index edf7101d03a303cd8b575a15d08d6ac4c4517249..17d6f174f92d551011bfb92b0e96c86118505359 100644 |
--- a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java |
+++ b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java |
@@ -39,6 +39,9 @@ import java.util.concurrent.Callable; |
*/ |
@RunWith(ContentJUnit4ClassRunner.class) |
public class ImeTest { |
+ private static final int DEFAULT_IME_OPTIONS = |
+ EditorInfo.IME_FLAG_NO_FULLSCREEN | EditorInfo.IME_FLAG_NO_EXTRACT_UI; |
Changwan Ryu
2017/05/09 18:12:16
Instead of make another dependency on the producti
AKVT
2017/05/10 09:31:38
Done. That seems to be more easier.
|
+ |
@Rule |
public ImeActivityTestRule mRule = new ImeActivityTestRule(); |
@@ -418,6 +421,26 @@ public class ImeTest { |
@Test |
@SmallTest |
+ @Feature({"TextInput", "Main"}) |
+ public void testAdvanceFocusNextAndPrevious() throws Exception { |
+ DOMUtils.clickNode(mRule.getContentViewCore(), "input_text"); |
+ mRule.assertWaitForKeyboardStatus(true); |
+ Assert.assertEquals(DEFAULT_IME_OPTIONS | EditorInfo.IME_ACTION_NEXT, |
AKVT
2017/05/09 17:22:18
I am seeing a failure in this line. As per the log
Changwan Ryu
2017/05/09 18:12:16
My initial guess is that assertWaitForKeyboardStat
AKVT
2017/05/10 09:31:38
Thanks. I corrected it using mRule.focusElement();
|
+ mRule.getInputMethodManagerWrapper().getImeOptions()); |
+ |
+ // Forward direction focus |
+ mRule.performEditorAction(EditorInfo.IME_ACTION_NEXT); |
+ Assert.assertEquals(DEFAULT_IME_OPTIONS | EditorInfo.IME_ACTION_NONE, |
+ mRule.getInputMethodManagerWrapper().getImeOptions()); |
+ mRule.performEditorAction(EditorInfo.IME_ACTION_NEXT); |
+ // Now we have reached the last element of the form, hence focus won't change after issuing |
+ // NEXT. |
+ Assert.assertEquals(DEFAULT_IME_OPTIONS | EditorInfo.IME_ACTION_NONE, |
+ mRule.getInputMethodManagerWrapper().getImeOptions()); |
+ } |
+ |
+ @Test |
+ @SmallTest |
@DisabledTest(message = "crbug.com/694812") |
@Feature({"TextInput"}) |
public void testShowAndHideSoftInput() throws Exception { |