summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQi Wang <wangqi@google.com>2016-03-03 14:05:51 -0800
committerQi Wang <wangqi@google.com>2016-03-07 13:00:56 -0800
commit82f67c1535b00320bdcc7df603c0f259df7b83a4 (patch)
treeb7cdd7214766c54f9125f861c762a68da9e7c41e /tests
parent01c453788cb2bf28293e68e46c3d3cc742bcb2a6 (diff)
downloadandroid_packages_apps_ContactsCommon-82f67c1535b00320bdcc7df603c0f259df7b83a4.tar.gz
android_packages_apps_ContactsCommon-82f67c1535b00320bdcc7df603c0f259df7b83a4.tar.bz2
android_packages_apps_ContactsCommon-82f67c1535b00320bdcc7df603c0f259df7b83a4.zip
Remove span tags for talkback of contact names.
When search for contacts, the result will have highlight prefix which will be read separately with other parts in talkback. By removing the span tags the result name is ensured to be read as one piece. Bug: 24309768 Change-Id: Ie98a111fdea453297c0f091a323c72bfb7a64701
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/contacts/common/list/ContactListItemViewTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/src/com/android/contacts/common/list/ContactListItemViewTest.java b/tests/src/com/android/contacts/common/list/ContactListItemViewTest.java
index 222863c6..c9b2e6d4 100644
--- a/tests/src/com/android/contacts/common/list/ContactListItemViewTest.java
+++ b/tests/src/com/android/contacts/common/list/ContactListItemViewTest.java
@@ -82,6 +82,9 @@ public class ContactListItemViewTest extends AndroidTestCase {
CharSequence seq = view.getNameTextView().getText();
assertEquals("John Doe", seq.toString());
SpannedTestUtils.assertPrefixSpan(seq, 5, 7);
+ // Talback should be without span tags.
+ assertEquals("John Doe", view.getNameTextView().getContentDescription());
+ assertFalse("John Doe".equals(seq));
}
public void testShowDisplayName_WithPrefixReversed() {