aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-06-06 04:11:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-06-06 04:11:26 +0000
commit83531df584d50ca38f483dfd67e3a3a1a2da5cdb (patch)
tree323820363cc6195cde351518fab534b60fe99c02 /tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
parent04ef4ce21cce83454dd10afd96cbc3be1f686a92 (diff)
parentb7206b6bcaf73640dd25b00898f5edd1b3edb762 (diff)
downloadlatinime-83531df584d50ca38f483dfd67e3a3a1a2da5cdb.tar.gz
latinime-83531df584d50ca38f483dfd67e3a3a1a2da5cdb.tar.xz
latinime-83531df584d50ca38f483dfd67e3a3a1a2da5cdb.zip
am b7206b6b: Merge "Add action key test for Lxx theme"
* commit 'b7206b6bcaf73640dd25b00898f5edd1b3edb762': Add action key test for Lxx theme
Diffstat (limited to 'tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
index 1ccb58c0f..15e2647c6 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
@@ -18,9 +18,7 @@ package com.android.inputmethod.keyboard;
import android.content.Context;
import android.content.res.Resources;
-import android.preference.PreferenceManager;
import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
import android.view.ContextThemeWrapper;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodInfo;
@@ -38,8 +36,7 @@ import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
import java.util.ArrayList;
import java.util.Locale;
-@SmallTest
-public class KeyboardLayoutSetTestsBase extends AndroidTestCase {
+public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase {
// All input method subtypes of LatinIME.
private final ArrayList<InputMethodSubtype> mAllSubtypesList = new ArrayList<>();
private final ArrayList<InputMethodSubtype> mAsciiCapableSubtypesList = new ArrayList<>();
@@ -48,13 +45,15 @@ public class KeyboardLayoutSetTestsBase extends AndroidTestCase {
private Context mThemeContext;
private int mScreenMetrics;
+ protected abstract int getKeyboardThemeForTests();
+
@Override
protected void setUp() throws Exception {
super.setUp();
mScreenMetrics = mContext.getResources().getInteger(R.integer.config_screen_metrics);
- final KeyboardTheme keyboardTheme = KeyboardTheme.getKeyboardTheme(
- PreferenceManager.getDefaultSharedPreferences(mContext));
+ final KeyboardTheme keyboardTheme = KeyboardTheme.searchKeyboardThemeById(
+ getKeyboardThemeForTests());
mThemeContext = new ContextThemeWrapper(mContext, keyboardTheme.mStyleId);
RichInputMethodManager.init(mThemeContext);
final RichInputMethodManager richImm = RichInputMethodManager.getInstance();