aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorSandeep Siddhartha <sansid@google.com>2014-09-24 03:47:28 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-24 03:47:28 +0000
commit9c6240eb1644f424e74119c0c245d02d04c69d2c (patch)
tree3f7e8cc85c4fb1f63d5be316cf3f472e56830733 /tests/src
parent9825677391f1ec7051740dc05dc33acf09fc3fb3 (diff)
parenta2dbc44895048d76fff7a24ae5ce44bd93bb8acb (diff)
downloadlatinime-9c6240eb1644f424e74119c0c245d02d04c69d2c.tar.gz
latinime-9c6240eb1644f424e74119c0c245d02d04c69d2c.tar.xz
latinime-9c6240eb1644f424e74119c0c245d02d04c69d2c.zip
am a2dbc448: Merge "Handle split layout tests for phones"
* commit 'a2dbc44895048d76fff7a24ae5ce44bd93bb8acb': Handle split layout tests for phones
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishSplitCustomizer.java35
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java17
2 files changed, 17 insertions, 35 deletions
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishSplitCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishSplitCustomizer.java
deleted file mode 100644
index b6d57d33a..000000000
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishSplitCustomizer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.keyboard.layout.tests;
-
-import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-
-import java.util.Locale;
-
-public class EnglishSplitCustomizer extends EnglishCustomizer {
-
- EnglishSplitCustomizer(Locale locale) {
- super(locale);
- }
-
- @Override
- public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
- return LayoutBase.joinKeys(
- LayoutBase.LANGUAGE_SWITCH_KEY, LayoutBase.SPACE_KEY, LayoutBase.SPACE_KEY);
- }
-}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java
index b9e40e0e7..b3340aace 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java
@@ -23,6 +23,7 @@ import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.keyboard.KeyboardLayoutSet;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -44,4 +45,20 @@ public class TestsSplitLayoutQwertyEnglishUS extends LayoutTestsBase {
@Override
LayoutBase getLayout() { return LAYOUT; }
+
+ private static class EnglishSplitCustomizer extends EnglishCustomizer {
+ EnglishSplitCustomizer(Locale locale) {
+ super(locale);
+ }
+
+ @Override
+ public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
+ if (isPhone) {
+ return super.getSpaceKeys(isPhone);
+ } else {
+ return LayoutBase.joinKeys(
+ LayoutBase.LANGUAGE_SWITCH_KEY, LayoutBase.SPACE_KEY, LayoutBase.SPACE_KEY);
+ }
+ }
+ }
}