diff options
Diffstat (limited to 'tests')
3 files changed, 11 insertions, 7 deletions
diff --git a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java index 18b78f127..b3906f814 100644 --- a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java @@ -320,13 +320,14 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme CallLogListItemViewHolder viewHolder = (CallLogListItemViewHolder) mAdapter.onCreateViewHolder(mParentView, /* viewType */ 0); bindViewForTest(viewHolder); - viewHolder.updateCallButton(); + viewHolder.updatePrimaryActionButton(); // The primaryActionView tag is set in the // {@link com.android.dialer.calllog.CallLogAdapter#bindView} method. If it is possible // to place a call to the phone number, a call intent will have been created for the // primaryActionView. - IntentProvider intentProvider = (IntentProvider) viewHolder.callActionView.getTag(); + IntentProvider intentProvider = + (IntentProvider) viewHolder.primaryActionButtonView.getTag(); Intent intent = intentProvider.getIntent(mActivity); // Starts a call. assertEquals(TestConstants.CALL_INTENT_ACTION, intent.getAction()); @@ -369,12 +370,13 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme if (presentation == Calls.PRESENTATION_RESTRICTED || presentation == Calls.PRESENTATION_UNKNOWN) { //If number is not callable, the primary action view should have a null tag. - assertNull(mItem.callActionView.getTag()); + assertNull(mItem.primaryActionButtonView.getTag()); } else { //If the number is callable, the primary action view should have a non-null tag. - assertNotNull(mItem.callActionView.getTag()); + assertNotNull(mItem.primaryActionButtonView.getTag()); - IntentProvider intentProvider = (IntentProvider)mItem.callActionView.getTag(); + IntentProvider intentProvider = + (IntentProvider) mItem.primaryActionButtonView.getTag(); Intent callIntent = intentProvider.getIntent(mActivity); //The intent should be to make the call @@ -451,7 +453,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme } }); getInstrumentation().waitForIdleSync(); - viewHolder.updateCallButton(); + viewHolder.updatePrimaryActionButton(); } private void bindViewForTest(CallLogListItemViewHolder viewHolder) { diff --git a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java index 091065b91..8ee85a436 100644 --- a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java @@ -78,7 +78,7 @@ public class CallLogListItemHelperTest extends AndroidTestCase { public void testSetPhoneCallDetails() { setPhoneCallDetailsWithNumber("12125551234", Calls.PRESENTATION_ALLOWED, "1-212-555-1234"); - assertEquals(View.VISIBLE, mViewHolder.callActionView.getVisibility()); + assertEquals(View.VISIBLE, mViewHolder.primaryActionButtonView.getVisibility()); } public void testSetPhoneCallDetails_Unknown() { diff --git a/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java b/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java index dd86b0d6f..96ef62abf 100644 --- a/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java +++ b/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java @@ -109,6 +109,7 @@ public class VoicemailPlaybackTest extends InstrumentationTestCase { // There is a background check that is testing to see if we have the content available. // Once that task completes, we shouldn't be showing the fetching message. mFakeAsyncTaskExecutor.runTask(CHECK_FOR_CONTENT); + getInstrumentation().waitForIdleSync(); assertHasOneTextViewContaining("Buffering"); assertHasZeroTextViewsContaining("Loading voicemail"); @@ -119,6 +120,7 @@ public class VoicemailPlaybackTest extends InstrumentationTestCase { setPlaybackViewForPresenter(); mFakeAsyncTaskExecutor.runTask(CHECK_FOR_CONTENT); + getInstrumentation().waitForIdleSync(); // The media player will have thrown an IOException since the file doesn't exist. // This should have put a failed to play message on screen, buffering is gone. |
