Merge "Unlock screen before test runs." into tm-dev am: 62b46c6409
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17546406 Change-Id: I6d171e5e12e121fa48ef8ff5d002398396424757 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -25,6 +25,7 @@ android_test {
|
|||||||
"androidx.test.uiautomator_uiautomator",
|
"androidx.test.uiautomator_uiautomator",
|
||||||
"compatibility-device-util-axt",
|
"compatibility-device-util-axt",
|
||||||
"platform-test-annotations",
|
"platform-test-annotations",
|
||||||
|
"platform-test-rules",
|
||||||
"truth-prebuilt",
|
"truth-prebuilt",
|
||||||
],
|
],
|
||||||
test_suites: [
|
test_suites: [
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import android.app.Instrumentation;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.platform.test.annotations.RootPermissionTest;
|
import android.platform.test.annotations.RootPermissionTest;
|
||||||
|
import android.platform.test.rule.UnlockScreenRule;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
@@ -36,6 +37,7 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
import androidx.test.platform.app.InstrumentationRegistry;
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
|
|
||||||
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@@ -43,6 +45,9 @@ import org.junit.runner.RunWith;
|
|||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public final class AutoShowTest {
|
public final class AutoShowTest {
|
||||||
|
|
||||||
|
@Rule
|
||||||
|
public UnlockScreenRule mUnlockScreenRule = new UnlockScreenRule();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void autoShow() {
|
public void autoShow() {
|
||||||
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
|
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.platform.test.annotations.RootPermissionTest;
|
import android.platform.test.annotations.RootPermissionTest;
|
||||||
|
import android.platform.test.rule.UnlockScreenRule;
|
||||||
import android.view.WindowInsets;
|
import android.view.WindowInsets;
|
||||||
import android.view.WindowInsetsAnimation;
|
import android.view.WindowInsetsAnimation;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
@@ -39,6 +40,7 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
import androidx.test.platform.app.InstrumentationRegistry;
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
|
|
||||||
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@@ -50,6 +52,9 @@ public final class ImeOpenCloseStressTest {
|
|||||||
|
|
||||||
private static final int NUM_TEST_ITERATIONS = 10;
|
private static final int NUM_TEST_ITERATIONS = 10;
|
||||||
|
|
||||||
|
@Rule
|
||||||
|
public UnlockScreenRule mUnlockScreenRule = new UnlockScreenRule();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test() {
|
public void test() {
|
||||||
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
|
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.drawable.Icon;
|
import android.graphics.drawable.Icon;
|
||||||
import android.platform.test.annotations.RootPermissionTest;
|
import android.platform.test.annotations.RootPermissionTest;
|
||||||
|
import android.platform.test.rule.UnlockScreenRule;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@ import androidx.test.uiautomator.Until;
|
|||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@@ -70,6 +72,9 @@ public final class NotificationTest {
|
|||||||
private static final BySelector REPLY_SEND_BUTTON_SELECTOR =
|
private static final BySelector REPLY_SEND_BUTTON_SELECTOR =
|
||||||
By.res("com.android.systemui", "remote_input_send");
|
By.res("com.android.systemui", "remote_input_send");
|
||||||
|
|
||||||
|
@Rule
|
||||||
|
public UnlockScreenRule mUnlockScreenRule = new UnlockScreenRule();
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private NotificationManager mNotificationManager;
|
private NotificationManager mNotificationManager;
|
||||||
private UiDevice mUiDevice;
|
private UiDevice mUiDevice;
|
||||||
|
|||||||
Reference in New Issue
Block a user