Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8375307 authored by Vaibhav Devmurari's avatar Vaibhav Devmurari Committed by Android (Google) Code Review
Browse files

Merge "Remove flaky test" into main

parents b434eb94 262b739c
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.Until;
import android.util.Log;
import android.view.KeyEvent;
import android.view.WindowManagerGlobal;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
@@ -601,28 +600,6 @@ public class InputMethodServiceTest {
                false /* orientationPortrait */);
    }

    @Test
    public void switchesKeyboardLayout_withShortcut_onlyIfImeVisible() throws Exception {
        setShowImeWithHardKeyboard(true /* enabled */);

        assertThat(mInputMethodService.isInputViewShown()).isFalse();
        assertThat(mInputMethodService.onKeyDown(KeyEvent.KEYCODE_SPACE,
                new KeyEvent(0 /* downTime */, 0 /* eventTime */, KeyEvent.ACTION_DOWN,
                        KeyEvent.KEYCODE_SPACE, 0 /* repeat */,
                        KeyEvent.META_CTRL_LEFT_ON | KeyEvent.META_CTRL_ON))).isFalse();

        verifyInputViewStatusOnMainSync(
                () -> assertThat(mActivity.showImeWithInputMethodManager(0 /* flags */)).isTrue(),
                true /* expected */,
                true /* inputViewStarted */);

        assertThat(mInputMethodService.isInputViewShown()).isTrue();
        assertThat(mInputMethodService.onKeyDown(KeyEvent.KEYCODE_SPACE,
                new KeyEvent(0 /* downTime */, 0 /* eventTime */, KeyEvent.ACTION_DOWN,
                        KeyEvent.KEYCODE_SPACE, 0 /* repeat */,
                        KeyEvent.META_CTRL_LEFT_ON | KeyEvent.META_CTRL_ON))).isTrue();
    }

    /**
     * This checks that when the system navigation bar is not created (e.g. emulator),
     * then the IME caption bar is also not created.