From 3c1f0214f285a2d8db08502fd82a050f53538917 Mon Sep 17 00:00:00 2001 From: Aaron Heuckroth Date: Thu, 15 Nov 2018 14:50:46 -0500 Subject: [PATCH] Switch NotificationSwipeHelperTest to use RunWithLooper. Test: Automated tests should pass (without flaking!) Change-Id: I7471452c096d87f1fe8021899fdb535952d325a1 --- .../stack/NotificationSwipeHelperTest.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java index dcd59462a7f78..db39373d3ae46 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java @@ -32,8 +32,8 @@ import android.animation.ValueAnimator.AnimatorUpdateListener; import android.os.Handler; import android.service.notification.StatusBarNotification; import android.support.test.filters.SmallTest; -import android.support.test.runner.AndroidJUnit4; -import android.testing.UiThreadTest; +import android.testing.AndroidTestingRunner; +import android.testing.TestableLooper; import android.view.MotionEvent; import android.view.View; @@ -44,7 +44,6 @@ import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.Snoo import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -56,9 +55,8 @@ import org.mockito.stubbing.Answer; * Tests for {@link NotificationSwipeHelper}. */ @SmallTest -@Ignore -@RunWith(AndroidJUnit4.class) -@UiThreadTest +@RunWith(AndroidTestingRunner.class) +@TestableLooper.RunWithLooper() public class NotificationSwipeHelperTest extends SysuiTestCase { private NotificationSwipeHelper mSwipeHelper;