am 6ee2cfa6: Merge "Run test only on KitKat devices"

* commit '6ee2cfa66c81162c2a42572ea63af1b5e38e339f':
  Run test only on KitKat devices
main
Jean Chalard 2014-05-28 10:13:23 +00:00 committed by Android Git Automerger
commit 664fceb034
1 changed files with 19 additions and 10 deletions

View File

@ -16,6 +16,7 @@
package com.android.inputmethod.latin; package com.android.inputmethod.latin;
import android.os.Build;
import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.LargeTest;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
@ -111,6 +112,13 @@ public class ShiftModeTests extends InputTestsBase {
} }
public void testOtherSentenceSeparators() { public void testOtherSentenceSeparators() {
// We only run this test on Kitkat+ because previous versions of Android don't
// have an Armenian locale. For some reason I don't know, when the requested
// locale is not present as a device locale, then the application under test can't
// access the resources in that locale -- though it works when the app is actually
// running on the device and not under test. If we ever figure out what's going
// on, remove this test.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
changeLanguage("hy-AM"); changeLanguage("hy-AM");
assertTrue("(Armenian) Auto caps at start", isCapsModeAutoShifted()); assertTrue("(Armenian) Auto caps at start", isCapsModeAutoShifted());
type("Hey. "); type("Hey. ");
@ -123,3 +131,4 @@ public class ShiftModeTests extends InputTestsBase {
isCapsModeAutoShifted()); isCapsModeAutoShifted());
} }
} }
}