diff options
Diffstat (limited to 'tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java')
-rw-r--r-- | tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java index 8fbda1596..4c9d92cfc 100644 --- a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java @@ -327,6 +327,21 @@ public class CallLogListItemHelperTest extends AndroidTestCase { .contains(this.mResources.getString(R.string.description_num_calls, 2))); } + /** + * Test getCallDescription method used to get the accessibility description for calls. + * Test that the "Video call." message is present if the call had video capability. + */ + public void testGetCallDescription_Video() { + PhoneCallDetails details = new PhoneCallDetails(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, + TEST_FORMATTED_NUMBER, + TEST_COUNTRY_ISO, TEST_GEOCODE, + new int[]{Calls.INCOMING_TYPE, Calls.INCOMING_TYPE}, TEST_DATE, TEST_DURATION, + null, Calls.FEATURES_VIDEO, null); + CharSequence description = mHelper.getCallDescription(details); + assertTrue(description.toString() + .contains(this.mResources.getString(R.string.description_video_call, 2))); + } + /** Asserts that the primary action view does not have a call intent. */ private void assertNoCallIntent() { Object intentProvider = (IntentProvider)mViews.primaryActionView.getTag(); |