From f351272c36e2730f539ccc18406d4f40066eaecc Mon Sep 17 00:00:00 2001 From: Bill Lin Date: Thu, 20 Feb 2020 12:47:32 +0800 Subject: [PATCH] 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 --- .../android/view/CutoutSpecificationTest.java | 17 +++++++++++++++++ .../wm/test/filters/FrameworksTestsFilter.java | 1 + 2 files changed, 18 insertions(+) diff --git a/core/tests/coretests/src/android/view/CutoutSpecificationTest.java b/core/tests/coretests/src/android/view/CutoutSpecificationTest.java index 1f831bb2f9a8e..dc79481d724cb 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}. + * + *

Build/Install/Run: + * atest FrameworksCoreTests:CutoutSpecificationTest + * + *

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 957216e179253..26916bcffcfb3 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",