summaryrefslogtreecommitdiff
path: root/tests/InputScreenshotTest
diff options
context:
space:
mode:
author Mike Schneider <michschn@google.com> 2024-03-08 11:02:29 +0100
committer Mike Schneider <michschn@google.com> 2024-03-08 11:02:29 +0100
commit0a20da746eeb2884d43a90bd8e32ab7de59b4875 (patch)
tree38f819ca5524dad28e8b06ca07a3a8324a908460 /tests/InputScreenshotTest
parentded43d4e21aa2511d4e12f73692e8d8c544e180b (diff)
Fold [GoldenImagePathManager] into [GoldenPathManager] #cleanup
These are required changes sto be submitted together with ag/26486827. Bug: 322324387 Test: Test-only change, covered by existing unit tests Change-Id: I57ae2d524e60548997ef77e5de31e446e3e70d73
Diffstat (limited to 'tests/InputScreenshotTest')
-rw-r--r--tests/InputScreenshotTest/src/android/input/screenshot/InputGoldenPathManager.kt (renamed from tests/InputScreenshotTest/src/android/input/screenshot/InputGoldenImagePathManager.kt)35
-rw-r--r--tests/InputScreenshotTest/src/android/input/screenshot/InputScreenshotTestRule.kt2
2 files changed, 17 insertions, 20 deletions
diff --git a/tests/InputScreenshotTest/src/android/input/screenshot/InputGoldenImagePathManager.kt b/tests/InputScreenshotTest/src/android/input/screenshot/InputGoldenPathManager.kt
index 8faf22440828..9f14b136861f 100644
--- a/tests/InputScreenshotTest/src/android/input/screenshot/InputGoldenImagePathManager.kt
+++ b/tests/InputScreenshotTest/src/android/input/screenshot/InputGoldenPathManager.kt
@@ -17,28 +17,25 @@
package com.android.input.screenshot
import androidx.test.platform.app.InstrumentationRegistry
-import platform.test.screenshot.GoldenImagePathManager
+import platform.test.screenshot.GoldenPathManager
import platform.test.screenshot.PathConfig
-/** A [GoldenImagePathManager] that should be used for all Input screenshot tests. */
-class InputGoldenImagePathManager(
- pathConfig: PathConfig,
- assetsPathRelativeToBuildRoot: String
-) :
- GoldenImagePathManager(
- appContext = InstrumentationRegistry.getInstrumentation().context,
- assetsPathRelativeToBuildRoot = assetsPathRelativeToBuildRoot,
- deviceLocalPath =
- InstrumentationRegistry.getInstrumentation()
- .targetContext
- .filesDir
- .absolutePath
- .toString() + "/input_screenshots",
- pathConfig = pathConfig,
- ) {
+/** A [GoldenPathManager] that should be used for all Input screenshot tests. */
+class InputGoldenPathManager(pathConfig: PathConfig, assetsPathRelativeToBuildRoot: String) :
+ GoldenPathManager(
+ appContext = InstrumentationRegistry.getInstrumentation().context,
+ assetsPathRelativeToBuildRoot = assetsPathRelativeToBuildRoot,
+ deviceLocalPath =
+ InstrumentationRegistry.getInstrumentation()
+ .targetContext
+ .filesDir
+ .absolutePath
+ .toString() + "/input_screenshots",
+ pathConfig = pathConfig,
+ ) {
override fun toString(): String {
// This string is appended to all actual/expected screenshots on the device, so make sure
// it is a static value.
- return "InputGoldenImagePathManager"
+ return "InputGoldenPathManager"
}
-} \ No newline at end of file
+}
diff --git a/tests/InputScreenshotTest/src/android/input/screenshot/InputScreenshotTestRule.kt b/tests/InputScreenshotTest/src/android/input/screenshot/InputScreenshotTestRule.kt
index 75dab41d3609..2f408964fd8c 100644
--- a/tests/InputScreenshotTest/src/android/input/screenshot/InputScreenshotTestRule.kt
+++ b/tests/InputScreenshotTest/src/android/input/screenshot/InputScreenshotTestRule.kt
@@ -44,7 +44,7 @@ class InputScreenshotTestRule(
private val deviceEmulationRule = DeviceEmulationRule(emulationSpec)
private val screenshotRule =
ScreenshotTestRule(
- InputGoldenImagePathManager(
+ InputGoldenPathManager(
getEmulatedDevicePathConfig(emulationSpec),
assetsPathRelativeToBuildRoot
)