aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/PunctuationTests.java
diff options
context:
space:
mode:
authorDan Zivkovic <zivkovic@google.com>2015-03-04 23:08:09 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-04 23:08:09 +0000
commit5512a84d3ef8167666a289e63efee372934d0bbc (patch)
tree35c1edb6db91a097b3ff86e6619a88ff65333cac /tests/src/com/android/inputmethod/latin/PunctuationTests.java
parent34adcf999607d758ebcaf095afa2de8b48a7e581 (diff)
parent1ae16dc3db170802d1b38273f477125a2a969d32 (diff)
downloadlatinime-5512a84d3ef8167666a289e63efee372934d0bbc.tar.gz
latinime-5512a84d3ef8167666a289e63efee372934d0bbc.tar.xz
latinime-5512a84d3ef8167666a289e63efee372934d0bbc.zip
am 1ae16dc3: Next-word suggestion bit in keyboard settings.
* commit '1ae16dc3db170802d1b38273f477125a2a969d32': Next-word suggestion bit in keyboard settings.
Diffstat (limited to '')
-rw-r--r--tests/src/com/android/inputmethod/latin/PunctuationTests.java34
1 files changed, 10 insertions, 24 deletions
diff --git a/tests/src/com/android/inputmethod/latin/PunctuationTests.java b/tests/src/com/android/inputmethod/latin/PunctuationTests.java
index 3537918de..9ac220407 100644
--- a/tests/src/com/android/inputmethod/latin/PunctuationTests.java
+++ b/tests/src/com/android/inputmethod/latin/PunctuationTests.java
@@ -19,37 +19,23 @@ package com.android.inputmethod.latin;
import android.provider.Settings.Secure;
import android.test.suitebuilder.annotation.LargeTest;
-import com.android.inputmethod.latin.R;
-
@LargeTest
public class PunctuationTests extends InputTestsBase {
- final String NEXT_WORD_PREDICTION_OPTION = "next_word_prediction";
-
public void testWordThenSpaceThenPunctuationFromStripTwice() {
final String WORD_TO_TYPE = "this ";
final String PUNCTUATION_FROM_STRIP = "!";
final String EXPECTED_RESULT = "this!! ";
- final boolean defaultNextWordPredictionOption =
- mLatinIME.getResources().getBoolean(R.bool.config_default_next_word_prediction);
- final boolean previousNextWordPredictionOption =
- setBooleanPreference(NEXT_WORD_PREDICTION_OPTION, false,
- defaultNextWordPredictionOption);
- try {
- mLatinIME.loadSettings();
- type(WORD_TO_TYPE);
- sleep(DELAY_TO_WAIT_FOR_UNDERLINE_MILLIS);
- runMessages();
- assertTrue("type word then type space should display punctuation strip",
- mLatinIME.getSuggestedWordsForTest().isPunctuationSuggestions());
- pickSuggestionManually(PUNCTUATION_FROM_STRIP);
- pickSuggestionManually(PUNCTUATION_FROM_STRIP);
- assertEquals("type word then type space then punctuation from strip twice",
- EXPECTED_RESULT, mEditText.getText().toString());
- } finally {
- setBooleanPreference(NEXT_WORD_PREDICTION_OPTION, previousNextWordPredictionOption,
- defaultNextWordPredictionOption);
- }
+ mLatinIME.loadSettings();
+ type(WORD_TO_TYPE);
+ sleep(DELAY_TO_WAIT_FOR_UNDERLINE_MILLIS);
+ runMessages();
+ assertTrue("type word then type space should display punctuation strip",
+ mLatinIME.getSuggestedWordsForTest().isPunctuationSuggestions());
+ pickSuggestionManually(PUNCTUATION_FROM_STRIP);
+ pickSuggestionManually(PUNCTUATION_FROM_STRIP);
+ assertEquals("type word then type space then punctuation from strip twice",
+ EXPECTED_RESULT, mEditText.getText().toString());
}
public void testWordThenSpaceThenPunctuationFromKeyboardTwice() {