Home
last modified time | relevance | path

Searched refs:spans (Results 1 – 5 of 5) sorted by relevance

/cts/tests/tests/text/src/android/text/util/cts/
DLinkifyTest.java92 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1() local
93 assertEquals(4, spans.length); in testAddLinks1()
94 assertEquals("http://www.google.com", spans[0].getURL()); in testAddLinks1()
95 assertEquals("http://www.google.com/language_tools?hl=en", spans[1].getURL()); in testAddLinks1()
96 assertEquals("http://a.bd", spans[2].getURL()); in testAddLinks1()
97 assertEquals("http://h." + longGTLD, spans[3].getURL()); in testAddLinks1()
100 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1()
101 assertEquals(1, spans.length); in testAddLinks1()
102 assertEquals("mailto:name@gmail.com", spans[0].getURL()); in testAddLinks1()
120 URLSpan[] spans = ((Spannable)tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinks2() local
[all …]
/cts/tests/tests/text/src/android/text/cts/
DSpannableStringBuilderTest.java584 Object[] spans = builder.getSpans(0, text.length(), Object.class); in testGetSpans_returnsEmptyIfSetSpanIsNotCalled() local
585 assertEquals(0, spans.length); in testGetSpans_returnsEmptyIfSetSpanIsNotCalled()
598 Object[] spans = builder.getSpans(0, text.length(), Object.class); in testGetSpans_returnsSpansInInsertionOrderWhenTheLaterCoversTheFirst() local
600 assertNotNull(spans); in testGetSpans_returnsSpansInInsertionOrderWhenTheLaterCoversTheFirst()
601 assertEquals(2, spans.length); in testGetSpans_returnsSpansInInsertionOrderWhenTheLaterCoversTheFirst()
602 assertEquals(first, spans[0]); in testGetSpans_returnsSpansInInsertionOrderWhenTheLaterCoversTheFirst()
603 assertEquals(second, spans[1]); in testGetSpans_returnsSpansInInsertionOrderWhenTheLaterCoversTheFirst()
623 Object[] spans = builder.getSpans(0, text.length(), Object.class); in testGetSpans_returnsSpansSortedFirstByPriorityThenByInsertionOrder() local
625 assertNotNull(spans); in testGetSpans_returnsSpansSortedFirstByPriorityThenByInsertionOrder()
626 assertEquals(4, spans.length); in testGetSpans_returnsSpansSortedFirstByPriorityThenByInsertionOrder()
[all …]
DHtmlTest.java64 Object[] spans = spanned.getSpans(start, end, Object.class); in assertSingleTagOnWhileString() local
65 assertEquals(expectLen, spans.length); in assertSingleTagOnWhileString()
66 assertEquals(expectStart, spanned.getSpanStart(spans[0])); in assertSingleTagOnWhileString()
67 assertEquals(expectEnd, spanned.getSpanEnd(spans[0])); in assertSingleTagOnWhileString()
84 Object[] spans = spanned.getSpans(start, end, Object.class); in assertBadHtml() local
85 assertEquals(spansLen, spans.length); in assertBadHtml()
362 Object[] spans = spanned.getSpans(0, spanned.length(), Object.class); in testMarkupFromHtml() local
363 assertEquals(1, spans.length); in testMarkupFromHtml()
364 assertEquals(StrikethroughSpan.class, spans[0].getClass()); in testMarkupFromHtml()
365 assertEquals(expectedStart, spanned.getSpanStart(spans[0])); in testMarkupFromHtml()
[all …]
DTextUtilsTest.java155 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); in testConcat() local
156 assertEquals(2, spans.length); in testConcat()
157 assertTrue(spans[0] instanceof URLSpan); in testConcat()
158 assertEquals(url, ((URLSpan) spans[0]).getURL()); in testConcat()
159 assertTrue(spans[1] instanceof BackgroundColorSpan); in testConcat()
160 assertEquals(Color.GREEN, ((BackgroundColorSpan) spans[1]).getBackgroundColor()); in testConcat()
181 Object[] spans; in testCopySpansFrom() local
195 spans = dest1.getSpans(0, dest1.length(), Object.class); in testCopySpansFrom()
196 assertEquals(2, spans.length); in testCopySpansFrom()
197 assertTrue(spans[0] instanceof URLSpan); in testCopySpansFrom()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DTextViewTest.java365 URLSpan[] spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() local
366 assertNotNull(spans); in testAccessAutoLinkMask()
367 assertEquals(2, spans.length); in testAccessAutoLinkMask()
368 assertEquals("http://www.google.com", spans[0].getURL()); in testAccessAutoLinkMask()
369 assertEquals("mailto:account@gmail.com", spans[1].getURL()); in testAccessAutoLinkMask()
383 spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask()
384 assertNotNull(spans); in testAccessAutoLinkMask()
385 assertEquals(1, spans.length); in testAccessAutoLinkMask()
386 assertEquals("tel:+41448008999", spans[0].getURL()); in testAccessAutoLinkMask()
3437 URLSpan[] spans = mTextView.getUrls(); in testGetUrls() local
[all …]