summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-05-06 00:10:11 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-06 00:10:11 +0000
commit5095ed699db20f738983e017d9725c87452bfb19 (patch)
tree4c3a0c7549567ed6f8b2ce821258776d8ddbb194 /core/tests
parentd6fe30600c86e46df499b3ab8f8b5fbbc8a2c528 (diff)
parenta1223cfe6f2e04da1ab6e0ad781068687446ee56 (diff)
downloadframeworks_base-5095ed699db20f738983e017d9725c87452bfb19.zip
frameworks_base-5095ed699db20f738983e017d9725c87452bfb19.tar.gz
frameworks_base-5095ed699db20f738983e017d9725c87452bfb19.tar.bz2
Merge "Take supportsSwitchingToNextInputMethod into considertaion"
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/inputmethodtests/src/android/os/InputMethodSubtypeSwitchingControllerTest.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/tests/inputmethodtests/src/android/os/InputMethodSubtypeSwitchingControllerTest.java b/core/tests/inputmethodtests/src/android/os/InputMethodSubtypeSwitchingControllerTest.java
index 6d33529..23b6780 100644
--- a/core/tests/inputmethodtests/src/android/os/InputMethodSubtypeSwitchingControllerTest.java
+++ b/core/tests/inputmethodtests/src/android/os/InputMethodSubtypeSwitchingControllerTest.java
@@ -73,7 +73,6 @@ public class InputMethodSubtypeSwitchingControllerTest extends InstrumentationTe
DUMMY_FORCE_DEFAULT, supportsSwitchingToNextInputMethod);
for (int i = 0; i < subtypes.size(); ++i) {
final String subtypeLocale = subtypeLocales.get(i);
- final InputMethodSubtype subtype = subtypes.get(i);
items.add(new ImeSubtypeListItem(imeName, subtypeLocale, imi, i, subtypeLocale,
SYSTEM_LOCALE));
}
@@ -116,36 +115,37 @@ public class InputMethodSubtypeSwitchingControllerTest extends InstrumentationTe
imList, ONLY_CURRENT_IME, currentIme.mImi, createDummySubtype(
currentIme.mSubtypeName.toString()));
assertEquals(imList.get(2), nextIme);
- // "switchAwareLatinIme/fr" -> "nonSwitchAwareLatinIme/en_UK
+ // "switchAwareLatinIme/fr" -> "switchAwareJapaneseIme/ja_JP"
currentIme = imList.get(2);
nextIme = InputMethodSubtypeSwitchingController.getNextInputMethodImpl(
imList, ONLY_CURRENT_IME, currentIme.mImi, createDummySubtype(
currentIme.mSubtypeName.toString()));
- assertEquals(imList.get(3), nextIme);
+ assertEquals(imList.get(5), nextIme);
+ // "switchAwareJapaneseIme/ja_JP" -> "switchAwareLatinIme/en_US"
+ currentIme = imList.get(5);
+ nextIme = InputMethodSubtypeSwitchingController.getNextInputMethodImpl(
+ imList, ONLY_CURRENT_IME, currentIme.mImi, createDummySubtype(
+ currentIme.mSubtypeName.toString()));
+ assertEquals(imList.get(0), nextIme);
+
// "nonSwitchAwareLatinIme/en_UK" -> "nonSwitchAwareLatinIme/hi"
currentIme = imList.get(3);
nextIme = InputMethodSubtypeSwitchingController.getNextInputMethodImpl(
imList, ONLY_CURRENT_IME, currentIme.mImi, createDummySubtype(
currentIme.mSubtypeName.toString()));
assertEquals(imList.get(4), nextIme);
- // "nonSwitchAwareLatinIme/hi" -> "switchAwareJapaneseIme/ja_JP"
+ // "nonSwitchAwareLatinIme/hi" -> "nonSwitchAwareJapaneseIme/ja_JP"
currentIme = imList.get(4);
nextIme = InputMethodSubtypeSwitchingController.getNextInputMethodImpl(
imList, ONLY_CURRENT_IME, currentIme.mImi, createDummySubtype(
currentIme.mSubtypeName.toString()));
- assertEquals(imList.get(5), nextIme);
- // "switchAwareJapaneseIme/ja_JP" -> "nonSwitchAwareJapaneseIme/ja_JP"
- currentIme = imList.get(5);
- nextIme = InputMethodSubtypeSwitchingController.getNextInputMethodImpl(
- imList, ONLY_CURRENT_IME, currentIme.mImi, createDummySubtype(
- currentIme.mSubtypeName.toString()));
assertEquals(imList.get(6), nextIme);
- // "nonSwitchAwareJapaneseIme/ja_JP" -> "switchAwareLatinIme/en_US"
+ // "nonSwitchAwareJapaneseIme/ja_JP" -> "nonSwitchAwareLatinIme/en_UK"
currentIme = imList.get(6);
nextIme = InputMethodSubtypeSwitchingController.getNextInputMethodImpl(
imList, ONLY_CURRENT_IME, currentIme.mImi, createDummySubtype(
currentIme.mSubtypeName.toString()));
- assertEquals(imList.get(0), nextIme);
+ assertEquals(imList.get(3), nextIme);
}
@SmallTest