diff options
Diffstat (limited to 'tests/src/com')
-rw-r--r-- | tests/src/com/android/dialer/CallDetailActivityTest.java | 18 | ||||
-rw-r--r-- | tests/src/com/android/dialer/onboard/DefaultDialerOnboardScreenTest.java | 6 |
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/src/com/android/dialer/CallDetailActivityTest.java b/tests/src/com/android/dialer/CallDetailActivityTest.java index 27fbc304e..eda74742b 100644 --- a/tests/src/com/android/dialer/CallDetailActivityTest.java +++ b/tests/src/com/android/dialer/CallDetailActivityTest.java @@ -84,11 +84,9 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal } /** - * Test for bug where voicemails should not have remove-from-call-log entry. - * <p> - * See http://b/5054103. + * Verifies the trash menu item is present and a voicemail URI is set. */ - public void testVoicemailDoesNotHaveRemoveFromCallLog() throws Throwable { + public void testVoicemailDeleteButton() throws Throwable { setActivityIntentForTestVoicemailEntry(); startActivityUnderTest(); mFakeAsyncTaskExecutor.runTask(GET_CALL_DETAILS); @@ -96,12 +94,13 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal Menu optionsMenu = (new PopupMenu(mActivityUnderTest, null)).getMenu(); mActivityUnderTest.onCreateOptionsMenu(optionsMenu); mActivityUnderTest.onPrepareOptionsMenu(optionsMenu); - assertFalse(optionsMenu.findItem(R.id.menu_remove_from_call_log).isVisible()); - assertTrue(optionsMenu.findItem(R.id.menu_trash).isVisible()); + + assertTrue(optionsMenu.findItem(R.id.call_detail_delete_menu_item).isVisible()); + assertTrue(mActivityUnderTest.hasVoicemail()); } /** - * Test to check that I haven't broken the remove-from-call-log entry from regular calls. + * Verifies the trash menu item is present and a voicemail URI is not set. */ public void testRegularCallDoesHaveRemoveFromCallLog() throws Throwable { setActivityIntentForTestCallEntry(); @@ -111,8 +110,9 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal Menu optionsMenu = (new PopupMenu(mActivityUnderTest, null)).getMenu(); mActivityUnderTest.onCreateOptionsMenu(optionsMenu); mActivityUnderTest.onPrepareOptionsMenu(optionsMenu); - assertTrue(optionsMenu.findItem(R.id.menu_remove_from_call_log).isVisible()); - assertFalse(optionsMenu.findItem(R.id.menu_trash).isVisible()); + + assertTrue(optionsMenu.findItem(R.id.call_detail_delete_menu_item).isVisible()); + assertFalse(mActivityUnderTest.hasVoicemail()); } private void setActivityIntentForTestCallEntry() { diff --git a/tests/src/com/android/dialer/onboard/DefaultDialerOnboardScreenTest.java b/tests/src/com/android/dialer/onboard/DefaultDialerOnboardScreenTest.java index f9724c14b..26e513f4b 100644 --- a/tests/src/com/android/dialer/onboard/DefaultDialerOnboardScreenTest.java +++ b/tests/src/com/android/dialer/onboard/DefaultDialerOnboardScreenTest.java @@ -36,17 +36,17 @@ public class DefaultDialerOnboardScreenTest extends AndroidTestCase { } public void testNeverRequestedForDefaultDialer_shouldShowScreen() { - when(mPermissionsChecker.previouslyRequestedDefaultDialer()).thenReturn(false); + when(mPermissionsChecker.hasAlreadyRequestedDefaultDialer()).thenReturn(false); assertTrue(mScreen.shouldShowScreen()); } public void testAlreadyAskedForDefaultDialer_shouldNotShowScreen() { - when(mPermissionsChecker.previouslyRequestedDefaultDialer()).thenReturn(true); + when(mPermissionsChecker.hasAlreadyRequestedDefaultDialer()).thenReturn(true); assertFalse(mScreen.shouldShowScreen()); } public void testAlreadySetAsDefaultDialer_shouldNotShowScreen() { - when(mPermissionsChecker.previouslyRequestedDefaultDialer()).thenReturn(false); + when(mPermissionsChecker.hasAlreadyRequestedDefaultDialer()).thenReturn(false); when(mPermissionsChecker.isDefaultOrSystemDialer()).thenReturn(true); assertFalse(mScreen.shouldShowScreen()); } |