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

Commit 31feec77 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "InputMethodServiceTest: improve robustness" into main

parents c4e6de50 5e2b1e0a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -25,6 +25,12 @@
        <option name="test-file-name" value="FrameworksImeTests.apk" />
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
        <option name="run-command" value="wm dismiss-keyguard" />
        <option name="run-command" value="settings put secure immersive_mode_confirmations confirmed" />
    </target_preparer>

    <option name="test-tag" value="FrameworksImeTests" />

    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+2 −2
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import androidx.test.platform.app.InstrumentationRegistry;

import com.android.apps.inputmethod.simpleime.ims.InputMethodServiceWrapper;
import com.android.apps.inputmethod.simpleime.testing.TestActivity;
import com.android.compatibility.common.util.SystemUtil;
import com.android.internal.inputmethod.InputMethodNavButtonFlags;

import org.junit.After;
@@ -834,8 +835,7 @@ public class InputMethodServiceTest {

    private String executeShellCommand(String cmd) throws IOException {
        Log.i(TAG, "Run command: " + cmd);
        return UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
                .executeShellCommand(cmd);
        return SystemUtil.runShellCommandOrThrow(cmd);
    }

    private void clickOnEditorText() {