diff options
author | Yorke Lee <yorkelee@google.com> | 2014-10-29 17:06:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-10-29 17:06:03 +0000 |
commit | f93220c3163a1878e95167753a262cf3ee1ddf9d (patch) | |
tree | c1c24dc244abef82fe7f5b6b9581ff65e76d2652 /tests | |
parent | 8265c1eb4d2c3fc627cded0bbbee5ca5325b6b98 (diff) | |
parent | 7026b17269d014e7b4146446c139f63e15de7a33 (diff) |
Merge "More test-related changes" into lmp-mr1-dev
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. */ |