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 12:11:35 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-06-06 12:56:57 +0900
commitc5dc74067385f9ab6ec3086825d0b369c26a1ea3 (patch)
tree9fa1a9a3a43df772827e3b5d63e68acb33cacf44 /tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
parent0ee8644666c01431adcc7d651ab1841c61f0bb43 (diff)
downloadlatinime-c5dc74067385f9ab6ec3086825d0b369c26a1ea3.tar.gz
latinime-c5dc74067385f9ab6ec3086825d0b369c26a1ea3.tar.xz
latinime-c5dc74067385f9ab6ec3086825d0b369c26a1ea3.zip
Add action key test for Lxx theme
Change-Id: I849cec7deb5607e8ce8fb25c1f903f15328fb611
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();