diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/dialer/CallDetailActivityTest.java | 3 | ||||
-rw-r--r-- | tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/tests/src/com/android/dialer/CallDetailActivityTest.java b/tests/src/com/android/dialer/CallDetailActivityTest.java index 1e16fe427..f9f0a5846 100644 --- a/tests/src/com/android/dialer/CallDetailActivityTest.java +++ b/tests/src/com/android/dialer/CallDetailActivityTest.java @@ -48,7 +48,8 @@ import java.util.List; import java.util.Locale; /** - * Unit tests for the {@link CallDetailActivity}. + * Unit tests for the {@link CallDetailActivity}. NOTE: The screen needs to be on for the + * UI-related tests to pass. */ @LargeTest public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<CallDetailActivity> { diff --git a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java index c0347cf0f..30a84c2f3 100644 --- a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java @@ -22,6 +22,7 @@ import android.provider.CallLog.Calls; import android.test.AndroidTestCase; import android.view.View; +import com.android.contacts.common.CallUtil; import com.android.dialer.PhoneCallDetails; import com.android.dialer.PhoneCallDetailsHelper; import com.android.dialer.R; @@ -323,8 +324,13 @@ public class CallLogListItemHelperTest extends AndroidTestCase { null, Calls.FEATURES_VIDEO, null, null); CharSequence description = mHelper.getCallDescription(getContext(), details); + final boolean isVideoEnabled = CallUtil.isVideoEnabled(getContext()); assertTrue(description.toString() - .contains(this.mResources.getString(R.string.description_video_call, 2))); + .contains(this.mResources.getString( + isVideoEnabled + ? R.string.description_video_call + : R.string.description_num_calls, + 2))); } /** Asserts that the primary action view does not have a call intent. */ |