diff options
| author | Yorke Lee <yorkelee@google.com> | 2014-10-28 15:45:12 -0700 |
|---|---|---|
| committer | Yorke Lee <yorkelee@google.com> | 2014-10-28 15:45:50 -0700 |
| commit | 7026b17269d014e7b4146446c139f63e15de7a33 (patch) | |
| tree | 9725576034563fb7fb956f0a8c5b0cfac4387b88 /tests | |
| parent | 8775131dc88ce4e7dcc94f68fcee69b6464fd59b (diff) | |
| download | packages_apps_Dialer-7026b17269d014e7b4146446c139f63e15de7a33.tar.gz packages_apps_Dialer-7026b17269d014e7b4146446c139f63e15de7a33.tar.bz2 packages_apps_Dialer-7026b17269d014e7b4146446c139f63e15de7a33.zip | |
More test-related changes
Fix failure in CallLogListItemHelper#testGetCallDescription_Video
Add some documentation to CallDetailActivityTest
Bug: 17487016
Change-Id: I31594feccb936500b20e13f3db5c68cbe5435c6e
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. */ |
