aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-07-28 12:14:18 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-28 12:14:18 +0000
commit4dba300e50587f1bc9c1c5ca7bd98adc1781bdf5 (patch)
treebf76da60d52fd8a56ef9a4a481ae5e809fb50aee /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parent2dc3a51001996a59ab6ea9556a3815159702c202 (diff)
parent26a2986581410536a98e1c311214dc90d9934546 (diff)
downloadlatinime-4dba300e50587f1bc9c1c5ca7bd98adc1781bdf5.tar.gz
latinime-4dba300e50587f1bc9c1c5ca7bd98adc1781bdf5.tar.xz
latinime-4dba300e50587f1bc9c1c5ca7bd98adc1781bdf5.zip
am 26a29865: am ab661e3e: Make "Show correction suggestions" as a binary option
* commit '26a2986581410536a98e1c311214dc90d9934546': Make "Show correction suggestions" as a binary option
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputLogicTests.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
index de9475af4..59b858dbd 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
@@ -16,12 +16,12 @@
package com.android.inputmethod.latin;
-import com.android.inputmethod.latin.settings.Settings;
-
import android.test.suitebuilder.annotation.LargeTest;
import android.text.TextUtils;
import android.view.inputmethod.BaseInputConnection;
+import com.android.inputmethod.latin.settings.Settings;
+
@LargeTest
public class InputLogicTests extends InputTestsBase {
@@ -242,16 +242,14 @@ public class InputLogicTests extends InputTestsBase {
public void testDoubleSpacePeriod() {
// Reset settings to default, else these tests will go flaky.
- setStringPreference(Settings.PREF_SHOW_SUGGESTIONS_SETTING, "0", "0");
+ setBooleanPreference(Settings.PREF_SHOW_SUGGESTIONS, true, true);
setStringPreference(Settings.PREF_AUTO_CORRECTION_THRESHOLD, "1", "1");
setBooleanPreference(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true, true);
testDoubleSpacePeriodWithSettings(true /* expectsPeriod */);
- // "Suggestion visibility" to "always hide"
- testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "2");
- // "Suggestion visibility" to "portrait only"
- testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "1");
- // "Suggestion visibility" to "always show"
- testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "0");
+ // "Suggestion visibility" to off
+ testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS, false);
+ // "Suggestion visibility" to on
+ testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS, true);
// "Double-space period" to "off"
testDoubleSpacePeriodWithSettings(false, Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, false);
@@ -264,10 +262,10 @@ public class InputLogicTests extends InputTestsBase {
testDoubleSpacePeriodWithSettings(true, Settings.PREF_AUTO_CORRECTION_THRESHOLD, "3");
// "Suggestion visibility" to "always hide" and "Auto-correction" to "off"
- testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "0",
+ testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS, false,
Settings.PREF_AUTO_CORRECTION_THRESHOLD, "0");
// "Suggestion visibility" to "always hide" and "Auto-correction" to "off"
- testDoubleSpacePeriodWithSettings(false, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "0",
+ testDoubleSpacePeriodWithSettings(false, Settings.PREF_SHOW_SUGGESTIONS, false,
Settings.PREF_AUTO_CORRECTION_THRESHOLD, "0",
Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, false);
}