mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Destroy RecentsDependencies in tests that initialise it." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
efebae2ef4
@@ -24,6 +24,7 @@ import com.android.quickstep.task.thumbnail.TaskThumbnailUiState.BackgroundOnly
|
||||
import com.android.quickstep.task.thumbnail.TaskThumbnailUiState.Uninitialized
|
||||
import com.android.quickstep.task.viewmodel.TaskThumbnailViewModel
|
||||
import com.google.android.apps.nexuslauncher.imagecomparison.goldenpathmanager.ViewScreenshotGoldenPathManager
|
||||
import org.junit.After
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -47,6 +48,11 @@ class TaskThumbnailViewScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
|
||||
private val taskThumbnailViewModel = FakeTaskThumbnailViewModel()
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
RecentsDependencies.destroy()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun taskThumbnailView_uninitializedByDefault() {
|
||||
screenshotRule.screenshotTest("taskThumbnailView_uninitialized") { activity ->
|
||||
|
||||
@@ -47,6 +47,7 @@ import com.android.systemui.shared.recents.model.Task.TaskKey
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import dagger.BindsInstance
|
||||
import dagger.Component
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -78,6 +79,11 @@ class TaskViewItemInfoTest {
|
||||
RecentsDependencies.initialize(context)
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
RecentsDependencies.destroy()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun singleTask() {
|
||||
val taskContainers = listOf(createTaskContainer(createTask(1)))
|
||||
|
||||
Reference in New Issue
Block a user