diff options
| author | 2024-07-03 10:31:56 -0400 | |
|---|---|---|
| committer | 2024-07-03 10:36:57 -0400 | |
| commit | bfb9af45af2b7a781d8dc16829a3e533b876cecf (patch) | |
| tree | 06dbfa6a0082231cea3565c2ef732cbc6bb11498 | |
| parent | d7e6d1b0a78fa3ac318d1b0817887732d2652a67 (diff) | |
Add robolectric screenshot tests for bubble edu
Flag: TEST_ONLY
Bug: 342417102
Test: atest WMShellRobolectricScreenshotTests
Change-Id: Ibca9ffe90f49a17e76e4bd61a50becfb79e25237
5 files changed, 35 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/multivalentScreenshotTests/Android.bp b/libs/WindowManager/Shell/multivalentScreenshotTests/Android.bp index c6dbd9b25e7f..1871203c7600 100644 --- a/libs/WindowManager/Shell/multivalentScreenshotTests/Android.bp +++ b/libs/WindowManager/Shell/multivalentScreenshotTests/Android.bp @@ -22,6 +22,40 @@ package { default_team: "trendy_team_multitasking_windowing", } +android_app { + name: "WMShellRobolectricScreenshotTestApp", + platform_apis: true, + certificate: "platform", + static_libs: [ + "WindowManager-Shell", + "platform-screenshot-diff-core", + ], + asset_dirs: ["goldens/robolectric"], + manifest: "AndroidManifestRobolectric.xml", + use_resource_processor: true, +} + +android_robolectric_test { + name: "WMShellRobolectricScreenshotTests", + instrumentation_for: "WMShellRobolectricScreenshotTestApp", + upstream: true, + java_resource_dirs: [ + "robolectric/config", + ], + srcs: [ + "src/**/*.kt", + ], + static_libs: [ + "junit", + "androidx.test.runner", + "androidx.test.rules", + "androidx.test.ext.junit", + "truth", + "platform-parametric-runner-lib", + ], + auto_gen_config: true, +} + android_test { name: "WMShellMultivalentScreenshotTestsOnDevice", srcs: [ diff --git a/libs/WindowManager/Shell/multivalentScreenshotTests/AndroidManifestRobolectric.xml b/libs/WindowManager/Shell/multivalentScreenshotTests/AndroidManifestRobolectric.xml index a7a3f1313a9b..b4bdaeaf0eac 100644 --- a/libs/WindowManager/Shell/multivalentScreenshotTests/AndroidManifestRobolectric.xml +++ b/libs/WindowManager/Shell/multivalentScreenshotTests/AndroidManifestRobolectric.xml @@ -16,7 +16,6 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.wm.shell.multivalentscreenshot"> <application android:debuggable="true" android:supportsRtl="true"> - <uses-library android:name="android.test.runner" /> <activity android:name="platform.test.screenshot.ScreenshotActivity" android:exported="true"> diff --git a/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/dark_portrait_bubbles_education.png b/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/dark_portrait_bubbles_education.png Binary files differnew file mode 100644 index 000000000000..723c6b8d9c93 --- /dev/null +++ b/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/dark_portrait_bubbles_education.png diff --git a/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/light_portrait_bubbles_education.png b/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/light_portrait_bubbles_education.png Binary files differnew file mode 100644 index 000000000000..723c6b8d9c93 --- /dev/null +++ b/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/light_portrait_bubbles_education.png diff --git a/libs/WindowManager/Shell/multivalentScreenshotTests/robolectric/config/robolectric.properties b/libs/WindowManager/Shell/multivalentScreenshotTests/robolectric/config/robolectric.properties index 7a0527ccaafb..d50d976c9e84 100644 --- a/libs/WindowManager/Shell/multivalentScreenshotTests/robolectric/config/robolectric.properties +++ b/libs/WindowManager/Shell/multivalentScreenshotTests/robolectric/config/robolectric.properties @@ -1,2 +1,3 @@ sdk=NEWEST_SDK +graphicsMode=NATIVE |