1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.inputmethod.keyboard; 18 19 import android.test.suitebuilder.annotation.MediumTest; 20 import android.view.inputmethod.EditorInfo; 21 import android.view.inputmethod.InputMethodSubtype; 22 23 import com.android.inputmethod.keyboard.internal.KeyboardIconsSet; 24 import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; 25 26 @MediumTest 27 public class KeyboardLayoutSetActionLabelLxxTests extends KeyboardLayoutSetActionLabelBase { 28 @Override getKeyboardThemeForTests()29 protected int getKeyboardThemeForTests() { 30 return KeyboardTheme.THEME_ID_LXX_LIGHT; 31 } 32 33 @Override testActionGo()34 public void testActionGo() { 35 for (final InputMethodSubtype subtype : getAllSubtypesList()) { 36 final String tag = "go " + SubtypeLocaleUtils.getSubtypeNameForLogging(subtype); 37 doTestActionKeyIcon(tag, subtype, EditorInfo.IME_ACTION_GO, 38 KeyboardIconsSet.NAME_GO_KEY); 39 } 40 } 41 42 @Override testActionSend()43 public void testActionSend() { 44 for (final InputMethodSubtype subtype : getAllSubtypesList()) { 45 final String tag = "send " + SubtypeLocaleUtils.getSubtypeNameForLogging(subtype); 46 doTestActionKeyIcon(tag, subtype, EditorInfo.IME_ACTION_SEND, 47 KeyboardIconsSet.NAME_SEND_KEY); 48 } 49 } 50 51 @Override testActionNext()52 public void testActionNext() { 53 for (final InputMethodSubtype subtype : getAllSubtypesList()) { 54 final String tag = "next " + SubtypeLocaleUtils.getSubtypeNameForLogging(subtype); 55 doTestActionKeyIcon(tag, subtype, EditorInfo.IME_ACTION_NEXT, 56 KeyboardIconsSet.NAME_NEXT_KEY); 57 } 58 } 59 60 @Override testActionDone()61 public void testActionDone() { 62 for (final InputMethodSubtype subtype : getAllSubtypesList()) { 63 final String tag = "done " + SubtypeLocaleUtils.getSubtypeNameForLogging(subtype); 64 doTestActionKeyIcon(tag, subtype, EditorInfo.IME_ACTION_DONE, 65 KeyboardIconsSet.NAME_DONE_KEY); 66 } 67 } 68 69 @Override testActionPrevious()70 public void testActionPrevious() { 71 for (final InputMethodSubtype subtype : getAllSubtypesList()) { 72 final String tag = "previous " + SubtypeLocaleUtils.getSubtypeNameForLogging(subtype); 73 doTestActionKeyIcon(tag, subtype, EditorInfo.IME_ACTION_PREVIOUS, 74 KeyboardIconsSet.NAME_PREVIOUS_KEY); 75 } 76 } 77 } 78