Loading tests/src/com/android/inputmethod/compat/LocaleSpanCompatUtilsTests.java +15 −3 Original line number Diff line number Diff line Loading @@ -16,18 +16,29 @@ package com.android.inputmethod.compat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import android.graphics.Typeface; import android.os.Build; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.text.SpannableString; import android.text.Spanned; import android.text.style.StyleSpan; import java.util.Locale; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest public class LocaleSpanCompatUtilsTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class LocaleSpanCompatUtilsTests { @Test public void testInstantiatable() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) { // LocaleSpan isn't yet available. Loading Loading @@ -61,6 +72,7 @@ public class LocaleSpanCompatUtilsTests extends AndroidTestCase { assertEquals(expectedCount, spans.length); } @Test public void testUpdateLocaleSpan() { if (!LocaleSpanCompatUtils.isLocaleSpanAvailable()) { return; Loading tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java +20 −3 Original line number Diff line number Diff line Loading @@ -16,10 +16,15 @@ package com.android.inputmethod.compat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.text.Spanned; import android.text.TextUtils; import android.text.style.SuggestionSpan; Loading @@ -33,8 +38,16 @@ import java.util.Locale; import javax.annotation.Nullable; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest public class SuggestionSpanUtilsTest extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class SuggestionSpanUtilsTest { private Context getContext() { return InstrumentationRegistry.getTargetContext(); } /** * Helper method to create a dummy {@link SuggestedWordInfo}. Loading Loading @@ -91,6 +104,7 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { } @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) @Test public void testGetTextWithAutoCorrectionIndicatorUnderline() { final String ORIGINAL_TEXT = "Hey!"; final Locale NONNULL_LOCALE = new Locale("en", "GB"); Loading @@ -107,6 +121,7 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { } @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) @Test public void testGetTextWithAutoCorrectionIndicatorUnderlineRootLocale() { final String ORIGINAL_TEXT = "Hey!"; final CharSequence text = SuggestionSpanUtils.getTextWithAutoCorrectionIndicatorUnderline( Loading @@ -121,6 +136,7 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { new String[]{}, Locale.ROOT, text); } @Test public void testGetTextWithSuggestionSpan() { final SuggestedWordInfo prediction1 = createWordInfo("Quality", SuggestedWordInfo.KIND_PREDICTION); Loading Loading @@ -218,6 +234,7 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { } } @Test public void testFindFirstLocaleFromSuggestionSpans() { final String[] suggestions = new String[] {"Quality", "Speed", "Price"}; final SuggestionSpan nullLocaleSpan = new SuggestionSpan((Locale)null, suggestions, 0); Loading tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java +11 −3 Original line number Diff line number Diff line Loading @@ -16,10 +16,12 @@ package com.android.inputmethod.compat; import static org.junit.Assert.assertTrue; import android.graphics.Typeface; import android.os.Parcel; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.text.SpannableString; import android.text.Spanned; import android.text.TextUtils; Loading @@ -29,8 +31,13 @@ import android.view.textservice.TextInfo; import java.util.Arrays; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest public class TextInfoCompatUtilsTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class TextInfoCompatUtilsTests { final private static String TEST_TEXT = "0123456789"; final private static int TEST_COOKIE = 0x1234; final private static int TEST_SEQUENCE_NUMBER = 0x4321; Loading @@ -45,6 +52,7 @@ public class TextInfoCompatUtilsTests extends AndroidTestCase { final private static int TEST_URL_SPAN_END = 7; final private static int TEST_URL_SPAN_FLAGS = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE; @Test public void testGetCharSequence() { final SpannableString text = new SpannableString(TEST_TEXT); text.setSpan(TEST_STYLE_SPAN, TEST_STYLE_SPAN_START, TEST_STYLE_SPAN_END, Loading tests/src/com/android/inputmethod/keyboard/KeyboardLayoutTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -18,15 +18,17 @@ package com.android.inputmethod.keyboard; import static org.junit.Assert.assertEquals; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import java.util.ArrayList; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest @RunWith(AndroidJUnit4.class) public class KeyboardLayoutTest { @Test public void testNewKeyboardLayout() { KeyboardLayout keyboardLayout = KeyboardLayout Loading tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java +35 −6 Original line number Diff line number Diff line Loading @@ -16,22 +16,34 @@ package com.android.inputmethod.keyboard; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_ICS; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_KLP; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_DARK; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_LIGHT; import android.content.Context; import android.content.SharedPreferences; import android.os.Build; import android.os.Build.VERSION_CODES; import android.preference.PreferenceManager; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import java.util.Arrays; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest public class KeyboardThemeTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class KeyboardThemeTests { private SharedPreferences mPrefs; private static final int THEME_ID_NULL = -1; Loading @@ -39,9 +51,12 @@ public class KeyboardThemeTests extends AndroidTestCase { private static final int THEME_ID_ILLEGAL = -3; private static final String ILLEGAL_THEME_ID_STRING = "ThisCausesNumberFormatExecption"; @Override protected void setUp() throws Exception { super.setUp(); private Context getContext() { return InstrumentationRegistry.getTargetContext(); } @Before public void setUp() throws Exception { mPrefs = PreferenceManager.getDefaultSharedPreferences(getContext()); } Loading Loading @@ -110,6 +125,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertKeyboardThemePreference(sdkVersion, THEME_ID_ILLEGAL, defaultThemeId); } @Test public void testKeyboardThemePreferenceOnKlp() { assertKeyboardThemePreferenceOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH); assertKeyboardThemePreferenceOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -130,6 +146,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertKeyboardThemePreference(sdkVersion, THEME_ID_ILLEGAL, defaultThemeId); } @Test public void testKeyboardThemePreferenceOnLxx() { assertKeyboardThemePreferenceOnLxx(Build.VERSION_CODES.LOLLIPOP); } Loading Loading @@ -165,6 +182,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertDefaultKeyboardTheme(sdkVersion, THEME_ID_ILLEGAL, THEME_ID_KLP); } @Test public void testDefaultKeyboardThemeOnKlp() { assertDefaultKeyboardThemeOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH); assertDefaultKeyboardThemeOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -183,6 +201,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertDefaultKeyboardTheme(sdkVersion, THEME_ID_ILLEGAL, THEME_ID_LXX_LIGHT); } @Test public void testDefaultKeyboardThemeOnLxx() { assertDefaultKeyboardThemeOnLxx(Build.VERSION_CODES.LOLLIPOP); } Loading Loading @@ -231,6 +250,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Upgrading keyboard on I,J and K. @Test public void testUpgradeKeyboardToLxxOnKlp() { assertUpgradeKeyboardToLxxOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH); assertUpgradeKeyboardToLxxOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -250,6 +270,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Upgrading keyboard on L. @Test public void testUpgradeKeyboardToLxxOnLxx() { assertUpgradeKeyboardToLxxOnLxx(Build.VERSION_CODES.LOLLIPOP); } Loading Loading @@ -293,6 +314,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Update platform from I,J, and K to I,J, and K @Test public void testUpgradePlatformToKlpFromKlp() { assertUpgradePlatformToKlpFrom(VERSION_CODES.ICE_CREAM_SANDWICH); assertUpgradePlatformToKlpFrom(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -318,6 +340,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Update platform from I,J, and K to L @Test public void testUpgradePlatformToLxx() { assertUpgradePlatformToLxxFrom(VERSION_CODES.ICE_CREAM_SANDWICH); assertUpgradePlatformToLxxFrom(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -328,6 +351,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Update platform from L to L. @Test public void testUpgradePlatformToLxxFromLxx() { final int oldSdkVersion = Build.VERSION_CODES.LOLLIPOP; final int newSdkVersion = Build.VERSION_CODES.LOLLIPOP; Loading Loading @@ -364,10 +388,12 @@ public class KeyboardThemeTests extends AndroidTestCase { } } @Test public void testSortedKeyboardTheme() { assertSortedKeyboardThemeArray(KeyboardTheme.KEYBOARD_THEMES); } @Test public void testSortedAvailableKeyboardTheme() { assertSortedKeyboardThemeArray(KeyboardTheme.getAvailableThemeArray(getContext())); } Loading @@ -384,6 +410,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertSortedKeyboardThemeArray(LIMITED_THEMES); } @Test public void testMissingSelectedThemeIcs() { // Clean up preferences. setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL); Loading @@ -399,6 +426,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertEquals(THEME_ID_KLP, actualTheme.mThemeId); } @Test public void testMissingSelectedThemeKlp() { // Clean up preferences. setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL); Loading @@ -414,6 +442,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertEquals(THEME_ID_KLP, actualTheme.mThemeId); } @Test public void testMissingSelectedThemeLxx() { // Clean up preferences. setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL); Loading Loading
tests/src/com/android/inputmethod/compat/LocaleSpanCompatUtilsTests.java +15 −3 Original line number Diff line number Diff line Loading @@ -16,18 +16,29 @@ package com.android.inputmethod.compat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import android.graphics.Typeface; import android.os.Build; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.text.SpannableString; import android.text.Spanned; import android.text.style.StyleSpan; import java.util.Locale; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest public class LocaleSpanCompatUtilsTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class LocaleSpanCompatUtilsTests { @Test public void testInstantiatable() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) { // LocaleSpan isn't yet available. Loading Loading @@ -61,6 +72,7 @@ public class LocaleSpanCompatUtilsTests extends AndroidTestCase { assertEquals(expectedCount, spans.length); } @Test public void testUpdateLocaleSpan() { if (!LocaleSpanCompatUtils.isLocaleSpanAvailable()) { return; Loading
tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java +20 −3 Original line number Diff line number Diff line Loading @@ -16,10 +16,15 @@ package com.android.inputmethod.compat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.text.Spanned; import android.text.TextUtils; import android.text.style.SuggestionSpan; Loading @@ -33,8 +38,16 @@ import java.util.Locale; import javax.annotation.Nullable; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest public class SuggestionSpanUtilsTest extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class SuggestionSpanUtilsTest { private Context getContext() { return InstrumentationRegistry.getTargetContext(); } /** * Helper method to create a dummy {@link SuggestedWordInfo}. Loading Loading @@ -91,6 +104,7 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { } @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) @Test public void testGetTextWithAutoCorrectionIndicatorUnderline() { final String ORIGINAL_TEXT = "Hey!"; final Locale NONNULL_LOCALE = new Locale("en", "GB"); Loading @@ -107,6 +121,7 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { } @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) @Test public void testGetTextWithAutoCorrectionIndicatorUnderlineRootLocale() { final String ORIGINAL_TEXT = "Hey!"; final CharSequence text = SuggestionSpanUtils.getTextWithAutoCorrectionIndicatorUnderline( Loading @@ -121,6 +136,7 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { new String[]{}, Locale.ROOT, text); } @Test public void testGetTextWithSuggestionSpan() { final SuggestedWordInfo prediction1 = createWordInfo("Quality", SuggestedWordInfo.KIND_PREDICTION); Loading Loading @@ -218,6 +234,7 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { } } @Test public void testFindFirstLocaleFromSuggestionSpans() { final String[] suggestions = new String[] {"Quality", "Speed", "Price"}; final SuggestionSpan nullLocaleSpan = new SuggestionSpan((Locale)null, suggestions, 0); Loading
tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java +11 −3 Original line number Diff line number Diff line Loading @@ -16,10 +16,12 @@ package com.android.inputmethod.compat; import static org.junit.Assert.assertTrue; import android.graphics.Typeface; import android.os.Parcel; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.text.SpannableString; import android.text.Spanned; import android.text.TextUtils; Loading @@ -29,8 +31,13 @@ import android.view.textservice.TextInfo; import java.util.Arrays; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest public class TextInfoCompatUtilsTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class TextInfoCompatUtilsTests { final private static String TEST_TEXT = "0123456789"; final private static int TEST_COOKIE = 0x1234; final private static int TEST_SEQUENCE_NUMBER = 0x4321; Loading @@ -45,6 +52,7 @@ public class TextInfoCompatUtilsTests extends AndroidTestCase { final private static int TEST_URL_SPAN_END = 7; final private static int TEST_URL_SPAN_FLAGS = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE; @Test public void testGetCharSequence() { final SpannableString text = new SpannableString(TEST_TEXT); text.setSpan(TEST_STYLE_SPAN, TEST_STYLE_SPAN_START, TEST_STYLE_SPAN_END, Loading
tests/src/com/android/inputmethod/keyboard/KeyboardLayoutTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -18,15 +18,17 @@ package com.android.inputmethod.keyboard; import static org.junit.Assert.assertEquals; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import java.util.ArrayList; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest @RunWith(AndroidJUnit4.class) public class KeyboardLayoutTest { @Test public void testNewKeyboardLayout() { KeyboardLayout keyboardLayout = KeyboardLayout Loading
tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java +35 −6 Original line number Diff line number Diff line Loading @@ -16,22 +16,34 @@ package com.android.inputmethod.keyboard; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_ICS; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_KLP; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_DARK; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_LIGHT; import android.content.Context; import android.content.SharedPreferences; import android.os.Build; import android.os.Build.VERSION_CODES; import android.preference.PreferenceManager; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import java.util.Arrays; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @SmallTest public class KeyboardThemeTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class KeyboardThemeTests { private SharedPreferences mPrefs; private static final int THEME_ID_NULL = -1; Loading @@ -39,9 +51,12 @@ public class KeyboardThemeTests extends AndroidTestCase { private static final int THEME_ID_ILLEGAL = -3; private static final String ILLEGAL_THEME_ID_STRING = "ThisCausesNumberFormatExecption"; @Override protected void setUp() throws Exception { super.setUp(); private Context getContext() { return InstrumentationRegistry.getTargetContext(); } @Before public void setUp() throws Exception { mPrefs = PreferenceManager.getDefaultSharedPreferences(getContext()); } Loading Loading @@ -110,6 +125,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertKeyboardThemePreference(sdkVersion, THEME_ID_ILLEGAL, defaultThemeId); } @Test public void testKeyboardThemePreferenceOnKlp() { assertKeyboardThemePreferenceOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH); assertKeyboardThemePreferenceOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -130,6 +146,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertKeyboardThemePreference(sdkVersion, THEME_ID_ILLEGAL, defaultThemeId); } @Test public void testKeyboardThemePreferenceOnLxx() { assertKeyboardThemePreferenceOnLxx(Build.VERSION_CODES.LOLLIPOP); } Loading Loading @@ -165,6 +182,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertDefaultKeyboardTheme(sdkVersion, THEME_ID_ILLEGAL, THEME_ID_KLP); } @Test public void testDefaultKeyboardThemeOnKlp() { assertDefaultKeyboardThemeOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH); assertDefaultKeyboardThemeOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -183,6 +201,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertDefaultKeyboardTheme(sdkVersion, THEME_ID_ILLEGAL, THEME_ID_LXX_LIGHT); } @Test public void testDefaultKeyboardThemeOnLxx() { assertDefaultKeyboardThemeOnLxx(Build.VERSION_CODES.LOLLIPOP); } Loading Loading @@ -231,6 +250,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Upgrading keyboard on I,J and K. @Test public void testUpgradeKeyboardToLxxOnKlp() { assertUpgradeKeyboardToLxxOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH); assertUpgradeKeyboardToLxxOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -250,6 +270,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Upgrading keyboard on L. @Test public void testUpgradeKeyboardToLxxOnLxx() { assertUpgradeKeyboardToLxxOnLxx(Build.VERSION_CODES.LOLLIPOP); } Loading Loading @@ -293,6 +314,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Update platform from I,J, and K to I,J, and K @Test public void testUpgradePlatformToKlpFromKlp() { assertUpgradePlatformToKlpFrom(VERSION_CODES.ICE_CREAM_SANDWICH); assertUpgradePlatformToKlpFrom(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -318,6 +340,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Update platform from I,J, and K to L @Test public void testUpgradePlatformToLxx() { assertUpgradePlatformToLxxFrom(VERSION_CODES.ICE_CREAM_SANDWICH); assertUpgradePlatformToLxxFrom(VERSION_CODES.ICE_CREAM_SANDWICH_MR1); Loading @@ -328,6 +351,7 @@ public class KeyboardThemeTests extends AndroidTestCase { } // Update platform from L to L. @Test public void testUpgradePlatformToLxxFromLxx() { final int oldSdkVersion = Build.VERSION_CODES.LOLLIPOP; final int newSdkVersion = Build.VERSION_CODES.LOLLIPOP; Loading Loading @@ -364,10 +388,12 @@ public class KeyboardThemeTests extends AndroidTestCase { } } @Test public void testSortedKeyboardTheme() { assertSortedKeyboardThemeArray(KeyboardTheme.KEYBOARD_THEMES); } @Test public void testSortedAvailableKeyboardTheme() { assertSortedKeyboardThemeArray(KeyboardTheme.getAvailableThemeArray(getContext())); } Loading @@ -384,6 +410,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertSortedKeyboardThemeArray(LIMITED_THEMES); } @Test public void testMissingSelectedThemeIcs() { // Clean up preferences. setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL); Loading @@ -399,6 +426,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertEquals(THEME_ID_KLP, actualTheme.mThemeId); } @Test public void testMissingSelectedThemeKlp() { // Clean up preferences. setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL); Loading @@ -414,6 +442,7 @@ public class KeyboardThemeTests extends AndroidTestCase { assertEquals(THEME_ID_KLP, actualTheme.mThemeId); } @Test public void testMissingSelectedThemeLxx() { // Clean up preferences. setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL); Loading