Loading libs/WindowManager/Shell/multivalentScreenshotTests/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ android_app { static_libs: [ "WindowManager-Shell", "platform-screenshot-diff-core", "ScreenshotComposeUtilsLib", // ComposableScreenshotTestRule & Theme.PlatformUi.Screenshot "SystemUI-res", // Theme.SystemUI (dragged in by ScreenshotComposeUtilsLib) ], asset_dirs: ["goldens/robolectric"], manifest: "AndroidManifestRobolectric.xml", Loading Loading @@ -63,6 +65,8 @@ android_test { ], static_libs: [ "WindowManager-Shell", "ScreenshotComposeUtilsLib", // ComposableScreenshotTestRule & Theme.PlatformUi.Screenshot "SystemUI-res", // Theme.SystemUI (dragged in by ScreenshotComposeUtilsLib) "junit", "androidx.test.runner", "androidx.test.rules", Loading libs/WindowManager/Shell/multivalentScreenshotTests/AndroidManifestRobolectric.xml +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ <application android:debuggable="true" android:supportsRtl="true"> <activity android:name="platform.test.screenshot.ScreenshotActivity" android:theme="@style/Theme.PlatformUi.Screenshot" android:exported="true"> </activity> </application> Loading libs/WindowManager/Shell/multivalentScreenshotTests/goldens/onDevice/phone/dark_portrait_bubbles_education.png +4.2 KiB (55.8 KiB) Loading image diff... libs/WindowManager/Shell/multivalentScreenshotTests/goldens/onDevice/phone/light_portrait_bubbles_education.png +4.42 KiB (56.1 KiB) Loading image diff... libs/WindowManager/Shell/multivalentScreenshotTests/src/com/android/wm/shell/bubbles/BubbleEducationViewScreenshotTest.kt +7 −1 Original line number Diff line number Diff line Loading @@ -15,10 +15,12 @@ */ package com.android.wm.shell.bubbles import android.graphics.Color import android.view.LayoutInflater import android.view.ViewGroup import com.android.wm.shell.R import com.android.wm.shell.shared.bubbles.BubblePopupView import com.android.wm.shell.testing.goldenpathmanager.WMShellGoldenPathManager import com.android.wm.shell.R import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -48,6 +50,10 @@ class BubbleEducationViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { fun bubblesEducation() { screenshotRule.screenshotTest("bubbles_education") { activity -> activity.actionBar?.hide() // Set the background color of the activity to be something not from the theme to // ensure good contrast between the education view and the background val rootView = activity.window.decorView.findViewById(android.R.id.content) as ViewGroup rootView.setBackgroundColor(Color.RED) val view = LayoutInflater.from(activity) .inflate(R.layout.bubble_bar_stack_education, null) as BubblePopupView Loading Loading
libs/WindowManager/Shell/multivalentScreenshotTests/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ android_app { static_libs: [ "WindowManager-Shell", "platform-screenshot-diff-core", "ScreenshotComposeUtilsLib", // ComposableScreenshotTestRule & Theme.PlatformUi.Screenshot "SystemUI-res", // Theme.SystemUI (dragged in by ScreenshotComposeUtilsLib) ], asset_dirs: ["goldens/robolectric"], manifest: "AndroidManifestRobolectric.xml", Loading Loading @@ -63,6 +65,8 @@ android_test { ], static_libs: [ "WindowManager-Shell", "ScreenshotComposeUtilsLib", // ComposableScreenshotTestRule & Theme.PlatformUi.Screenshot "SystemUI-res", // Theme.SystemUI (dragged in by ScreenshotComposeUtilsLib) "junit", "androidx.test.runner", "androidx.test.rules", Loading
libs/WindowManager/Shell/multivalentScreenshotTests/AndroidManifestRobolectric.xml +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ <application android:debuggable="true" android:supportsRtl="true"> <activity android:name="platform.test.screenshot.ScreenshotActivity" android:theme="@style/Theme.PlatformUi.Screenshot" android:exported="true"> </activity> </application> Loading
libs/WindowManager/Shell/multivalentScreenshotTests/goldens/onDevice/phone/dark_portrait_bubbles_education.png +4.2 KiB (55.8 KiB) Loading image diff...
libs/WindowManager/Shell/multivalentScreenshotTests/goldens/onDevice/phone/light_portrait_bubbles_education.png +4.42 KiB (56.1 KiB) Loading image diff...
libs/WindowManager/Shell/multivalentScreenshotTests/src/com/android/wm/shell/bubbles/BubbleEducationViewScreenshotTest.kt +7 −1 Original line number Diff line number Diff line Loading @@ -15,10 +15,12 @@ */ package com.android.wm.shell.bubbles import android.graphics.Color import android.view.LayoutInflater import android.view.ViewGroup import com.android.wm.shell.R import com.android.wm.shell.shared.bubbles.BubblePopupView import com.android.wm.shell.testing.goldenpathmanager.WMShellGoldenPathManager import com.android.wm.shell.R import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -48,6 +50,10 @@ class BubbleEducationViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { fun bubblesEducation() { screenshotRule.screenshotTest("bubbles_education") { activity -> activity.actionBar?.hide() // Set the background color of the activity to be something not from the theme to // ensure good contrast between the education view and the background val rootView = activity.window.decorView.findViewById(android.R.id.content) as ViewGroup rootView.setBackgroundColor(Color.RED) val view = LayoutInflater.from(activity) .inflate(R.layout.bubble_bar_stack_education, null) as BubblePopupView Loading