/cts/tests/tests/text/src/android/text/util/cts/ |
D | LinkifyTest.java | 110 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinksToSpannable() local 111 assertEquals(4, spans.length); in testAddLinksToSpannable() 112 assertEquals("http://www.google.com", spans[0].getURL()); in testAddLinksToSpannable() 113 assertEquals("http://www.google.com/language_tools?hl=en", spans[1].getURL()); in testAddLinksToSpannable() 114 assertEquals("http://a.bd", spans[2].getURL()); in testAddLinksToSpannable() 115 assertEquals("http://h." + longGTLD, spans[3].getURL()); in testAddLinksToSpannable() 118 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinksToSpannable() 119 assertEquals(1, spans.length); in testAddLinksToSpannable() 120 assertEquals("mailto:name@gmail.com", spans[0].getURL()); in testAddLinksToSpannable() 138 URLSpan[] spans = ((Spannable) tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinksToTextView() local [all …]
|
/cts/tests/tests/text/src/android/text/cts/ |
D | SpannableStringBuilderTest.java | 402 final Object[] spans = builder.getSpans(0, builder.length(), Object.class); in testAppend_textWithSpan() local 403 assertNotNull("Appended text included a Quote span", spans); in testAppend_textWithSpan() 404 assertEquals("Appended text included a Quote span", 1, spans.length); in testAppend_textWithSpan() 405 assertSame("Should be the same span instance", span, spans[0]); in testAppend_textWithSpan() 407 spanStart, builder.getSpanStart(spans[0])); in testAppend_textWithSpan() 409 spanEnd, builder.getSpanEnd(spans[0])); in testAppend_textWithSpan() 627 Object[] spans = builder.getSpans(0, text.length(), Object.class); in testGetSpans_returnsEmptyIfSetSpanIsNotCalled() local 628 assertEquals(0, spans.length); in testGetSpans_returnsEmptyIfSetSpanIsNotCalled() 652 final SubscriptSpan[] spans = builder.getSpans(0, builder.length(), SubscriptSpan.class); in assertGetSpans_returnsInInsertionOrder() local 654 assertNotNull(spans); in assertGetSpans_returnsInInsertionOrder() [all …]
|
D | HtmlTest.java | 70 Object[] spans = spanned.getSpans(start, end, Object.class); in verifySingleTagOnWhileString() local 71 assertEquals(expectLen, spans.length); in verifySingleTagOnWhileString() 72 assertEquals(expectStart, spanned.getSpanStart(spans[0])); in verifySingleTagOnWhileString() 73 assertEquals(expectEnd, spanned.getSpanEnd(spans[0])); in verifySingleTagOnWhileString() 91 Object[] spans = spanned.getSpans(start, end, Object.class); in verifyBadHtml() local 92 assertEquals(spansLen, spans.length); in verifyBadHtml() 396 Object[] spans = spanned.getSpans(0, spanned.length(), Object.class); in testMarkupFromHtml() local 397 assertEquals(1, spans.length); in testMarkupFromHtml() 398 assertEquals(StrikethroughSpan.class, spans[0].getClass()); in testMarkupFromHtml() 399 assertEquals(expectedStart, spanned.getSpanStart(spans[0])); in testMarkupFromHtml() [all …]
|
D | TextUtilsTest.java | 279 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); in testConcat() local 280 assertEquals(2, spans.length); in testConcat() 281 assertTrue(spans[0] instanceof URLSpan); in testConcat() 282 assertEquals(url, ((URLSpan) spans[0]).getURL()); in testConcat() 283 assertTrue(spans[1] instanceof BackgroundColorSpan); in testConcat() 284 assertEquals(Color.GREEN, ((BackgroundColorSpan) spans[1]).getBackgroundColor()); in testConcat() 311 final Object[] spans = result.getSpans(0, result.length(), Object.class); in testConcat_NullParameters() local 312 assertEquals(1, spans.length); in testConcat_NullParameters() 313 assertSame(span, spans[0]); in testConcat_NullParameters() 314 assertEquals(0, result.getSpanStart(spans[0])); in testConcat_NullParameters() [all …]
|
D | BidiFormatterTest.java | 307 Object[] spans; in testCharSequenceApis() local 311 spans = wrapped.getSpans(0, wrapped.length(), Object.class); in testCharSequenceApis() 312 assertEquals(1, spans.length); in testCharSequenceApis() 313 assertEquals(RELATIVE_SIZE_SPAN, spans[0]); in testCharSequenceApis() 319 spans = wrapped.getSpans(0, wrapped.length(), Object.class); in testCharSequenceApis() 320 assertEquals(1, spans.length); in testCharSequenceApis() 321 assertEquals(RELATIVE_SIZE_SPAN, spans[0]); in testCharSequenceApis() 327 spans = wrapped.getSpans(0, wrapped.length(), Object.class); in testCharSequenceApis() 328 assertEquals(1, spans.length); in testCharSequenceApis() 329 assertEquals(RELATIVE_SIZE_SPAN, spans[0]); in testCharSequenceApis() [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextActionTest.java | 296 T spans[] = ((Spanned) accessibilityTextWithSpan) in findSingleSpanInViewWithText() local 298 assertEquals(1, spans.length); in findSingleSpanInViewWithText() 299 return spans[0]; in findSingleSpanInViewWithText()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewTest.java | 536 URLSpan[] spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() local 537 assertNotNull(spans); in testAccessAutoLinkMask() 538 assertEquals(2, spans.length); in testAccessAutoLinkMask() 539 assertEquals("http://www.google.com", spans[0].getURL()); in testAccessAutoLinkMask() 540 assertEquals("mailto:account@gmail.com", spans[1].getURL()); in testAccessAutoLinkMask() 552 spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() 553 assertNotNull(spans); in testAccessAutoLinkMask() 554 assertEquals(1, spans.length); in testAccessAutoLinkMask() 555 assertEquals("tel:+41448008999", spans[0].getURL()); in testAccessAutoLinkMask() 4298 URLSpan[] spans = mTextView.getUrls(); in testGetUrls() local [all …]
|