diff options
author | Jordan Demeulenaere <jdemeulenaere@google.com> | 2021-07-14 20:25:49 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-07-14 20:25:49 +0000 |
commit | 5a058e988995aacf54de11ab3770f6ebd1f71173 (patch) | |
tree | 1eac01db8d3e736704ff05f32e741eadec9edd18 | |
parent | 7c426b22efd5d5643e58561ea0b0b7dad8785bad (diff) | |
parent | 94240f3acd1a33fda00c7ec09f128a4438210189 (diff) | |
download | base-5a058e988995aacf54de11ab3770f6ebd1f71173.tar.gz |
Merge "Fix ActivityLaunchAnimatorTest crash" into sc-dev am: 94240f3acd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15283591
Change-Id: Ie65ae22076d45707ebd7a394af7978176b3347f9
-rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt index 33cc7821eba4..694b84a0b949 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt @@ -10,6 +10,7 @@ import android.graphics.Rect import android.os.Looper import android.testing.AndroidTestingRunner import android.testing.TestableLooper.RunWithLooper +import android.util.Log import android.view.IRemoteAnimationFinishedCallback import android.view.RemoteAnimationAdapter import android.view.RemoteAnimationTarget @@ -27,6 +28,7 @@ import junit.framework.Assert.assertNotNull import junit.framework.Assert.assertNull import junit.framework.Assert.assertTrue import junit.framework.AssertionFailedError +import kotlin.concurrent.thread import org.junit.Before import org.junit.Rule import org.junit.Test @@ -39,7 +41,6 @@ import org.mockito.Mockito.never import org.mockito.Mockito.verify import org.mockito.Spy import org.mockito.junit.MockitoJUnit -import kotlin.concurrent.thread @SmallTest @RunWith(AndroidTestingRunner::class) @@ -50,6 +51,7 @@ class ActivityLaunchAnimatorTest : SysuiTestCase() { @Spy private val controller = TestLaunchAnimatorController(launchContainer) @Mock lateinit var iCallback: IRemoteAnimationFinishedCallback @Mock lateinit var startingSurface: StartingSurface + @Mock lateinit var failHandler: Log.TerribleFailureHandler private lateinit var activityLaunchAnimator: ActivityLaunchAnimator @get:Rule val rule = MockitoJUnit.rule() @@ -179,8 +181,10 @@ class ActivityLaunchAnimatorTest : SysuiTestCase() { } @Test - fun controllerFromOrphanViewReturnsNull() { + fun controllerFromOrphanViewReturnsNullAndIsATerribleFailure() { + Log.setWtfHandler(failHandler) assertNull(ActivityLaunchAnimator.Controller.fromView(View(mContext))) + verify(failHandler).onTerribleFailure(any(), any(), anyBoolean()) } private fun fakeWindow(): RemoteAnimationTarget { |