aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputTestsBase.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-20 08:02:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-12-20 08:02:07 +0000
commit689cff2e3b1ad3709033b36040dc8607a7cb53d6 (patch)
treec6c70b8dfcb08fd284c0880ff400037884c15841 /tests/src/com/android/inputmethod/latin/InputTestsBase.java
parentdb6d9b0ab4630348e6522883151c79ba9490a67a (diff)
parent1404c1af850236da4fe4ed3825b70cb228a1da5b (diff)
downloadlatinime-689cff2e3b1ad3709033b36040dc8607a7cb53d6.tar.gz
latinime-689cff2e3b1ad3709033b36040dc8607a7cb53d6.tar.xz
latinime-689cff2e3b1ad3709033b36040dc8607a7cb53d6.zip
Merge "[IL21] Move the workaround utils to a better place."
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputTestsBase.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
index aaad740e4..cee73c917 100644
--- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
@@ -162,6 +162,13 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
return setBooleanPreference(PREF_DEBUG_MODE, value, false);
}
+ protected EditorInfo enrichEditorInfo(final EditorInfo ei) {
+ // Some tests that inherit from us need to add some data in the EditorInfo (see
+ // AppWorkaroundsTests#enrichEditorInfo() for a concrete example of this). Since we
+ // control the EditorInfo, we supply a hook here for children to override.
+ return ei;
+ }
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -176,12 +183,13 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
mPreviousAutoCorrectSetting = setStringPreference(PREF_AUTO_CORRECTION_THRESHOLD,
DEFAULT_AUTO_CORRECTION_THRESHOLD, DEFAULT_AUTO_CORRECTION_THRESHOLD);
mLatinIME.onCreate();
- final EditorInfo ei = new EditorInfo();
+ EditorInfo ei = new EditorInfo();
final InputConnection ic = mEditText.onCreateInputConnection(ei);
final LayoutInflater inflater =
(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final ViewGroup vg = new FrameLayout(getContext());
mInputView = inflater.inflate(R.layout.input_view, vg);
+ ei = enrichEditorInfo(ei);
mLatinIME.onCreateInputMethodInterface().startInput(ic, ei);
mLatinIME.setInputView(mInputView);
mLatinIME.onBindInput();