From 1361e89b29444eca16856c848fc609d1b12499db Mon Sep 17 00:00:00 2001 From: Tsung-Mao Fang Date: Tue, 4 Feb 2020 18:19:27 +0800 Subject: [PATCH] Fix failing test cases Test: Run robo test Fix: 148200531 Change-Id: I73698515d6b6572b2d81eb4ca34a3dd7c370968a --- .../wifi/calling/ListWithEntrySummaryPreferenceTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/robotests/src/com/android/settings/wifi/calling/ListWithEntrySummaryPreferenceTest.java b/tests/robotests/src/com/android/settings/wifi/calling/ListWithEntrySummaryPreferenceTest.java index b4ad1676a1b..e864ce38320 100644 --- a/tests/robotests/src/com/android/settings/wifi/calling/ListWithEntrySummaryPreferenceTest.java +++ b/tests/robotests/src/com/android/settings/wifi/calling/ListWithEntrySummaryPreferenceTest.java @@ -28,14 +28,13 @@ import androidx.appcompat.app.AlertDialog; import com.android.settings.R; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; +import org.robolectric.shadows.ShadowLooper; @RunWith(RobolectricTestRunner.class) -@Ignore public class ListWithEntrySummaryPreferenceTest { private Context mContext; @@ -55,6 +54,7 @@ public class ListWithEntrySummaryPreferenceTest { public void setUp() { mContext = RuntimeEnvironment.application; mContext.setTheme(R.style.Theme_Settings_Home); + ShadowLooper.pauseMainLooper(); mPreference = new ListWithEntrySummaryPreference(mContext, null); mPreference.setEntries(mDefaultEntries); mPreference.setEntryValues(mDefaultEntryValues); @@ -62,7 +62,7 @@ public class ListWithEntrySummaryPreferenceTest { } @Test - public void initialize_defaultEntries_shouldDisplayDefalutEntries() { + public void initialize_defaultEntries_shouldDisplayDefaultEntries() { AlertDialog dialog = showDialog(mPreference); ListAdapter adapter = dialog.getListView().getAdapter();