Home
last modified time | relevance | path

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

/cts/tests/tests/text/src/android/text/util/cts/
DLinkifyTest.java90 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1() local
91 assertEquals(4, spans.length); in testAddLinks1()
92 assertEquals("http://www.google.com", spans[0].getURL()); in testAddLinks1()
93 assertEquals("http://www.google.com/language_tools?hl=en", spans[1].getURL()); in testAddLinks1()
94 assertEquals("http://a.bc", spans[2].getURL()); in testAddLinks1()
95 assertEquals("http://h." + longGTLD, spans[3].getURL()); in testAddLinks1()
98 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1()
99 assertEquals(1, spans.length); in testAddLinks1()
100 assertEquals("mailto:name@gmail.com", spans[0].getURL()); in testAddLinks1()
118 URLSpan[] spans = ((Spannable)tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinks2() local
[all …]
/cts/tests/tests/text/src/android/text/cts/
DTextUtilsTest.java158 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); in testConcat() local
159 assertEquals(2, spans.length); in testConcat()
160 assertTrue(spans[0] instanceof URLSpan); in testConcat()
161 assertEquals(url, ((URLSpan) spans[0]).getURL()); in testConcat()
162 assertTrue(spans[1] instanceof BackgroundColorSpan); in testConcat()
163 assertEquals(Color.GREEN, ((BackgroundColorSpan) spans[1]).getBackgroundColor()); in testConcat()
184 Object[] spans; in testCopySpansFrom() local
198 spans = dest1.getSpans(0, dest1.length(), Object.class); in testCopySpansFrom()
199 assertEquals(2, spans.length); in testCopySpansFrom()
200 assertTrue(spans[0] instanceof URLSpan); in testCopySpansFrom()
[all …]
DHtmlTest.java56 Object[] spans = spanned.getSpans(start, end, Object.class); in assertSingleTagOnWhileString() local
57 assertEquals(expectLen, spans.length); in assertSingleTagOnWhileString()
58 assertEquals(expectStart, spanned.getSpanStart(spans[0])); in assertSingleTagOnWhileString()
59 assertEquals(expectEnd, spanned.getSpanEnd(spans[0])); in assertSingleTagOnWhileString()
76 Object[] spans = spanned.getSpans(start, end, Object.class); in assertBadHtml() local
77 assertEquals(spansLen, spans.length); in assertBadHtml()
/cts/tests/tests/widget/src/android/widget/cts/
DTextViewTest.java357 URLSpan[] spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() local
358 assertNotNull(spans); in testAccessAutoLinkMask()
359 assertEquals(2, spans.length); in testAccessAutoLinkMask()
360 assertEquals("http://www.google.com", spans[0].getURL()); in testAccessAutoLinkMask()
361 assertEquals("mailto:account@gmail.com", spans[1].getURL()); in testAccessAutoLinkMask()
375 spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask()
376 assertNotNull(spans); in testAccessAutoLinkMask()
377 assertEquals(1, spans.length); in testAccessAutoLinkMask()
378 assertEquals("tel:+41448008999", spans[0].getURL()); in testAccessAutoLinkMask()
2910 URLSpan[] spans = mTextView.getUrls(); in testGetUrls() local
[all …]