summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-10-27 17:45:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-27 17:45:39 +0000
commit7d7591f5644d58f561d74fb0899a452d0dad7f1e (patch)
tree9aef8d6e1dc26bcdf2e846b5334f94b759f8a7ef /tests
parent2f44b3c979f292211982608869af3c07cba06620 (diff)
parent6c86e632b5c5f65567e45114b6bd1ba48f5863d8 (diff)
downloadandroid_packages_apps_Dialer-7d7591f5644d58f561d74fb0899a452d0dad7f1e.tar.gz
android_packages_apps_Dialer-7d7591f5644d58f561d74fb0899a452d0dad7f1e.tar.bz2
android_packages_apps_Dialer-7d7591f5644d58f561d74fb0899a452d0dad7f1e.zip
Merge "Fix some broken Dialer tests" into lmp-mr1-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/dialer/calllog/CallLogFragmentTest.java5
-rw-r--r--tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java5
-rw-r--r--tests/src/com/android/dialer/util/TestConstants.java7
3 files changed, 13 insertions, 4 deletions
diff --git a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java
index e0e111bcf..b88989d4d 100644
--- a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java
+++ b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java
@@ -42,6 +42,7 @@ import android.widget.FrameLayout;
import com.android.contacts.common.test.FragmentTestActivity;
import com.android.dialer.CallDetailActivity;
import com.android.dialer.R;
+import com.android.dialer.util.TestConstants;
import java.util.Date;
import java.util.Formatter;
@@ -323,7 +324,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme
IntentProvider intentProvider = (IntentProvider) views.callBackButtonView.getTag();
Intent intent = intentProvider.getIntent(mActivity);
// Starts a call.
- assertEquals(Intent.ACTION_CALL_PRIVILEGED, intent.getAction());
+ assertEquals(TestConstants.CALL_INTENT_ACTION, intent.getAction());
// To the entry's number.
assertEquals(Uri.parse("tel:" + TEST_NUMBER), intent.getData());
}
@@ -385,7 +386,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme
Intent callIntent = intentProvider.getIntent(mActivity);
//The intent should be to make the call
- assertEquals(Intent.ACTION_CALL_PRIVILEGED, callIntent.getAction());
+ assertEquals(TestConstants.CALL_INTENT_ACTION, callIntent.getAction());
}
}
}
diff --git a/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java b/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java
index 8d4b01f67..6671022ba 100644
--- a/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java
+++ b/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java
@@ -35,6 +35,7 @@ import com.android.contacts.common.test.mocks.MockContentProvider;
import com.android.contacts.common.test.mocks.MockContentProvider.Query;
import com.android.contacts.common.util.ContactDisplayUtils;
import com.android.dialer.interactions.PhoneNumberInteraction.PhoneItem;
+import com.android.dialer.util.TestConstants;
import java.util.ArrayList;
import java.util.List;
@@ -179,7 +180,7 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
Intent intent = mContext.getIntentForStartActivity();
assertNotNull(intent);
- assertEquals(Intent.ACTION_CALL_PRIVILEGED, intent.getAction());
+ assertEquals(TestConstants.CALL_INTENT_ACTION, intent.getAction());
assertEquals("tel:123", intent.getDataString());
}
@@ -197,7 +198,7 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
Intent intent = mContext.getIntentForStartActivity();
assertNotNull(intent);
- assertEquals(Intent.ACTION_CALL_PRIVILEGED, intent.getAction());
+ assertEquals(TestConstants.CALL_INTENT_ACTION, intent.getAction());
assertEquals("sip:example%40example.com", intent.getDataString());
}
diff --git a/tests/src/com/android/dialer/util/TestConstants.java b/tests/src/com/android/dialer/util/TestConstants.java
new file mode 100644
index 000000000..780626a27
--- /dev/null
+++ b/tests/src/com/android/dialer/util/TestConstants.java
@@ -0,0 +1,7 @@
+package com.android.dialer.util;
+
+import android.content.Intent;
+
+public class TestConstants {
+ public static final String CALL_INTENT_ACTION = Intent.ACTION_CALL;
+}