Merge "Fixes tests."
diff --git a/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java b/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
index 1e5d879..0d371d8 100644
--- a/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
+++ b/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
@@ -148,7 +148,9 @@
     public void testSetPhoneCallDetails_MultipleCallTypeIconsLastOneDropped() {
         setPhoneCallDetailsWithCallTypeIcons(Calls.MISSED_TYPE, Calls.MISSED_TYPE,
                 Calls.INCOMING_TYPE, Calls.OUTGOING_TYPE);
-        assertCallTypeIconsEquals(Calls.MISSED_TYPE, Calls.MISSED_TYPE, Calls.INCOMING_TYPE);
+        assertCallTypeIconsEqualsPlusOverflow(
+            getContext().getString(R.string.call_log_item_count, 4),
+            Calls.MISSED_TYPE, Calls.MISSED_TYPE, Calls.INCOMING_TYPE);
     }
 
     public void testSetPhoneCallDetails_CallTypeText() {
@@ -234,6 +236,22 @@
         assertEquals(View.GONE, mViews.callTypeSeparator.getVisibility());
     }
 
+    /**
+     * Asserts that the call type contains the images with the given drawables and shows the given
+     * text next to the icons.
+     */
+    private void assertCallTypeIconsEqualsPlusOverflow(String overflowText, int... ids) {
+        assertEquals(ids.length, mViews.callTypeIcons.getCount());
+        for (int index = 0; index < ids.length; ++index) {
+            int id = ids[index];
+            assertEquals(id, mViews.callTypeIcons.getCallType(index));
+        }
+        assertEquals(View.VISIBLE, mViews.callTypeIcons.getVisibility());
+        assertEquals(View.VISIBLE, mViews.callTypeText.getVisibility());
+        assertEquals(overflowText, mViews.callTypeText.getText().toString());
+        assertEquals(View.VISIBLE, mViews.callTypeSeparator.getVisibility());
+    }
+
     /** Asserts that the call type contains the given text. */
     private void assertCallTypeTextEquals(String text) {
         assertEquals(text, mViews.callTypeText.getText().toString());