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:08:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-06 04:08:40 +0000
commitb7206b6bcaf73640dd25b00898f5edd1b3edb762 (patch)
tree323820363cc6195cde351518fab534b60fe99c02 /tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
parent70ff0c212262309e381d00636bf66d231a2a9dfb (diff)
parentc5dc74067385f9ab6ec3086825d0b369c26a1ea3 (diff)
downloadlatinime-b7206b6bcaf73640dd25b00898f5edd1b3edb762.tar.gz
latinime-b7206b6bcaf73640dd25b00898f5edd1b3edb762.tar.xz
latinime-b7206b6bcaf73640dd25b00898f5edd1b3edb762.zip
Merge "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();