summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Bill Lin <lbill@google.com> 2020-02-20 12:47:32 +0800
committer Bill Lin <lbill@google.com> 2020-02-20 14:19:55 +0800
commitf351272c36e2730f539ccc18406d4f40066eaecc (patch)
treecd4c30c10a994a846c9247fd874be3784987f838
parent1ad9e57d97eec105eb67f8f12a5a31565e72b5ec (diff)
Add CutoutSpecificationTest in Presubmit Test scope
1) Add CutoutSpecificationTest in Presubmit 2) Add CutoutSpecificationTest in FrameworksTestsFilter Fixes: 149883140 Test: atest FrameworksCoreTests:CutoutSpecificationTest Test: adb shell am instrument -w \ -e filter com.android.server.wm.test.filters.FrameworksTestsFilter \ -e selectTest_verbose true \ com.android.frameworks.coretests/androidx.test.runner.AndroidJUnitRunner Change-Id: I7db8f7797740d48a158650b63b7e90e5f1f28361
-rw-r--r--core/tests/coretests/src/android/view/CutoutSpecificationTest.java17
-rw-r--r--tests/utils/testutils/java/com/android/server/wm/test/filters/FrameworksTestsFilter.java1
2 files changed, 18 insertions, 0 deletions
diff --git a/core/tests/coretests/src/android/view/CutoutSpecificationTest.java b/core/tests/coretests/src/android/view/CutoutSpecificationTest.java
index 1f831bb2f9a8..dc79481d724c 100644
--- a/core/tests/coretests/src/android/view/CutoutSpecificationTest.java
+++ b/core/tests/coretests/src/android/view/CutoutSpecificationTest.java
@@ -21,10 +21,27 @@ import static com.google.common.truth.Truth.assertThat;
import static org.testng.Assert.assertThrows;
import android.graphics.Rect;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
+/**
+ * Tests for {@link CutoutSpecification} used by {@link DisplayCutout}.
+ *
+ * <p>Build/Install/Run:
+ * atest FrameworksCoreTests:CutoutSpecificationTest
+ *
+ * <p>This test class is a part of Window Manager Service tests and specified in
+ * {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
+ */
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class CutoutSpecificationTest {
private static final String WITHOUT_BIND_CUTOUT_SPECIFICATION = "M 0,0\n"
+ "h 48\n"
diff --git a/tests/utils/testutils/java/com/android/server/wm/test/filters/FrameworksTestsFilter.java b/tests/utils/testutils/java/com/android/server/wm/test/filters/FrameworksTestsFilter.java
index 957216e17925..26916bcffcfb 100644
--- a/tests/utils/testutils/java/com/android/server/wm/test/filters/FrameworksTestsFilter.java
+++ b/tests/utils/testutils/java/com/android/server/wm/test/filters/FrameworksTestsFilter.java
@@ -38,6 +38,7 @@ public final class FrameworksTestsFilter extends SelectTest {
"android.app.activity.ActivityThreadClientTest",
// Test specifications for FrameworksCoreTests.
"android.app.servertransaction.", // all tests under the package.
+ "android.view.CutoutSpecificationTest",
"android.view.DisplayCutoutTest",
"android.view.InsetsAnimationControlImplTest",
"android.view.InsetsControllerTest",