diff options
author | shawnlin <shawnlin@google.com> | 2022-04-01 11:05:18 +0800 |
---|---|---|
committer | shawnlin <shawnlin@google.com> | 2022-04-02 16:11:45 +0800 |
commit | 2eb06a9840369a6de672333d8660fe71671b1ca7 (patch) | |
tree | c31de4fa24a6a567f9012d2823ae113846702d7c | |
parent | 872ceaecafe985a92641b4e5be80109527660cdc (diff) | |
download | cts-2eb06a9840369a6de672333d8660fe71671b1ca7.tar.gz |
[DO NOT MERGE] WindowInsetsBehaviorTests downstreaming
Bug: 205493938
Test: 1.make gts
2.gts-tradef
3.run gts -m CtsSystemUiTestCases -t
android.systemui.cts.WindowInsetsBehaviorTests
Change-Id: If246221404ea1044b0683138959faf0b33c7d713
-rw-r--r-- | apps/VpnApp/Android.bp | 1 | ||||
-rw-r--r-- | tests/inputmethod/mockime/Android.bp | 1 | ||||
-rw-r--r-- | tests/tests/systemui/Android.bp | 2 | ||||
-rw-r--r-- | tests/tests/systemui/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | tests/tests/systemui/AndroidTest.xml | 1 | ||||
-rw-r--r-- | tests/tests/systemui/AudioRecorderTestApp_AudioRecord/Android.bp | 1 | ||||
-rw-r--r-- | tests/tests/systemui/AudioRecorderTestApp_MediaRecorder/Android.bp | 1 | ||||
-rw-r--r-- | tests/tests/systemui/PipTestApp/Android.bp | 1 | ||||
-rw-r--r-- | tests/tests/systemui/src/android/systemui/cts/WindowInsetsBehaviorTests.java | 7 |
9 files changed, 18 insertions, 0 deletions
diff --git a/apps/VpnApp/Android.bp b/apps/VpnApp/Android.bp index 898f4bdf91b..55ef022080a 100644 --- a/apps/VpnApp/Android.bp +++ b/apps/VpnApp/Android.bp @@ -49,6 +49,7 @@ android_test_helper_app { manifest: "latest/AndroidManifest.xml", test_suites: [ "cts", + "gts", "general-tests", ], } diff --git a/tests/inputmethod/mockime/Android.bp b/tests/inputmethod/mockime/Android.bp index 5ee05054e40..a72460251a8 100644 --- a/tests/inputmethod/mockime/Android.bp +++ b/tests/inputmethod/mockime/Android.bp @@ -44,6 +44,7 @@ android_test_helper_app { // tag this module as a cts test artifact test_suites: [ "cts", + "gts", "general-tests", "mts", "sts", diff --git a/tests/tests/systemui/Android.bp b/tests/tests/systemui/Android.bp index 0d28f65c5c2..fc48c72c684 100644 --- a/tests/tests/systemui/Android.bp +++ b/tests/tests/systemui/Android.bp @@ -19,8 +19,10 @@ package { android_test { name: "CtsSystemUiTestCases", defaults: ["cts_defaults"], + min_sdk_version: "27", test_suites: [ "cts", + "gts", "general-tests", ], diff --git a/tests/tests/systemui/AndroidManifest.xml b/tests/tests/systemui/AndroidManifest.xml index f55ed3f13c5..c1c0a317b0c 100644 --- a/tests/tests/systemui/AndroidManifest.xml +++ b/tests/tests/systemui/AndroidManifest.xml @@ -18,6 +18,9 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android.systemui.cts" android:targetSandboxVersion="2"> + + <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" /> + <uses-permission android:name="android.permission.INJECT_EVENTS"/> <uses-permission android:name="android.permission.DISABLE_KEYGUARD"/> <uses-permission android:name="android.permission.READ_DREAM_STATE"/> diff --git a/tests/tests/systemui/AndroidTest.xml b/tests/tests/systemui/AndroidTest.xml index 74876ae668e..7a848572ebc 100644 --- a/tests/tests/systemui/AndroidTest.xml +++ b/tests/tests/systemui/AndroidTest.xml @@ -15,6 +15,7 @@ --> <configuration description="Config for CTS SystemUI test cases"> <option name="test-suite-tag" value="cts" /> + <option name="test-suite-tag" value="gts" /> <option name="config-descriptor:metadata" key="component" value="sysui" /> <option name="config-descriptor:metadata" key="parameter" value="instant_app" /> <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" /> diff --git a/tests/tests/systemui/AudioRecorderTestApp_AudioRecord/Android.bp b/tests/tests/systemui/AudioRecorderTestApp_AudioRecord/Android.bp index 3737637a15d..41b247c86f1 100644 --- a/tests/tests/systemui/AudioRecorderTestApp_AudioRecord/Android.bp +++ b/tests/tests/systemui/AudioRecorderTestApp_AudioRecord/Android.bp @@ -24,6 +24,7 @@ android_test_helper_app { // tag this module as a cts test artifact test_suites: [ "cts", + "gts", "vts10", "general-tests", ], diff --git a/tests/tests/systemui/AudioRecorderTestApp_MediaRecorder/Android.bp b/tests/tests/systemui/AudioRecorderTestApp_MediaRecorder/Android.bp index af7f01c1e22..76b1250b1af 100644 --- a/tests/tests/systemui/AudioRecorderTestApp_MediaRecorder/Android.bp +++ b/tests/tests/systemui/AudioRecorderTestApp_MediaRecorder/Android.bp @@ -24,6 +24,7 @@ android_test_helper_app { // tag this module as a cts test artifact test_suites: [ "cts", + "gts", "vts10", "general-tests", ], diff --git a/tests/tests/systemui/PipTestApp/Android.bp b/tests/tests/systemui/PipTestApp/Android.bp index b8219c803f6..5b7b4d9cd72 100644 --- a/tests/tests/systemui/PipTestApp/Android.bp +++ b/tests/tests/systemui/PipTestApp/Android.bp @@ -36,6 +36,7 @@ android_test_helper_app { // Tag this module as a cts test artifact test_suites: [ "cts", + "gts", "vts10", "general-tests", ], diff --git a/tests/tests/systemui/src/android/systemui/cts/WindowInsetsBehaviorTests.java b/tests/tests/systemui/src/android/systemui/cts/WindowInsetsBehaviorTests.java index b5e657c00fd..1f0369ab38f 100644 --- a/tests/tests/systemui/src/android/systemui/cts/WindowInsetsBehaviorTests.java +++ b/tests/tests/systemui/src/android/systemui/cts/WindowInsetsBehaviorTests.java @@ -46,6 +46,7 @@ import android.graphics.Insets; import android.graphics.Point; import android.graphics.Rect; import android.hardware.display.DisplayManager; +import android.os.Build; import android.os.Bundle; import android.provider.DeviceConfig; import android.support.test.uiautomator.By; @@ -64,6 +65,8 @@ import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.rule.ActivityTestRule; import androidx.test.runner.AndroidJUnit4; +import com.android.compatibility.common.util.ApiLevelUtil; +import com.android.compatibility.common.util.CtsDownstreamingTest; import com.android.compatibility.common.util.SystemUtil; import com.android.compatibility.common.util.ThrowingRunnable; @@ -600,9 +603,11 @@ public class WindowInsetsBehaviorTests { /** * @throws Throwable when setting the property goes wrong. */ + @CtsDownstreamingTest @Test public void systemGesture_excludeViewRects_withoutAnyCancel() throws Throwable { + assumeTrue(ApiLevelUtil.isAtLeast(Build.VERSION_CODES.S_V2)); assumeTrue(hasSystemGestureFeature()); mainThreadRun(() -> mContentViewWindowInsets = mActivity.getDecorViewWindowInsets()); @@ -635,8 +640,10 @@ public class WindowInsetsBehaviorTests { assertEquals(swipeCount[0], mActionDownPoints.size()); } + @CtsDownstreamingTest @Test public void systemGesture_notExcludeViewRects_withoutAnyCancel() { + assumeTrue(ApiLevelUtil.isAtLeast(Build.VERSION_CODES.S_V2)); assumeTrue(hasSystemGestureFeature()); mainThreadRun(() -> mActivity.setSystemGestureExclusion(null)); |