/cts/tests/tests/text/src/android/text/util/cts/ |
D | LinkifyTest.java | 115 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinksToSpannable() local 116 assertEquals(4, spans.length); in testAddLinksToSpannable() 117 assertEquals("http://www.google.com", spans[0].getURL()); in testAddLinksToSpannable() 118 assertEquals("http://www.google.com/language_tools?hl=en", spans[1].getURL()); in testAddLinksToSpannable() 119 assertEquals("http://a.bd", spans[2].getURL()); in testAddLinksToSpannable() 120 assertEquals("http://h." + longGTLD, spans[3].getURL()); in testAddLinksToSpannable() 123 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinksToSpannable() 124 assertEquals(1, spans.length); in testAddLinksToSpannable() 125 assertEquals("mailto:name@gmail.com", spans[0].getURL()); in testAddLinksToSpannable() 143 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 | 403 final Object[] spans = builder.getSpans(0, builder.length(), Object.class); in testAppend_textWithSpan() local 404 assertNotNull("Appended text included a Quote span", spans); in testAppend_textWithSpan() 405 assertEquals("Appended text included a Quote span", 1, spans.length); in testAppend_textWithSpan() 406 assertSame("Should be the same span instance", span, spans[0]); in testAppend_textWithSpan() 408 spanStart, builder.getSpanStart(spans[0])); in testAppend_textWithSpan() 410 spanEnd, builder.getSpanEnd(spans[0])); in testAppend_textWithSpan() 628 Object[] spans = builder.getSpans(0, text.length(), Object.class); in testGetSpans_returnsEmptyIfSetSpanIsNotCalled() local 629 assertEquals(0, spans.length); in testGetSpans_returnsEmptyIfSetSpanIsNotCalled() 653 final SubscriptSpan[] spans = builder.getSpans(0, builder.length(), SubscriptSpan.class); in assertGetSpans_returnsInInsertionOrder() local 655 assertNotNull(spans); in assertGetSpans_returnsInInsertionOrder() [all …]
|
D | HtmlTest.java | 71 Object[] spans = spanned.getSpans(start, end, Object.class); in verifySingleTagOnWhileString() local 72 assertEquals(expectLen, spans.length); in verifySingleTagOnWhileString() 73 assertEquals(expectStart, spanned.getSpanStart(spans[0])); in verifySingleTagOnWhileString() 74 assertEquals(expectEnd, spanned.getSpanEnd(spans[0])); in verifySingleTagOnWhileString() 92 Object[] spans = spanned.getSpans(start, end, Object.class); in verifyBadHtml() local 93 assertEquals(spansLen, spans.length); in verifyBadHtml() 397 Object[] spans = spanned.getSpans(0, spanned.length(), Object.class); in testMarkupFromHtml() local 398 assertEquals(1, spans.length); in testMarkupFromHtml() 399 assertEquals(StrikethroughSpan.class, spans[0].getClass()); in testMarkupFromHtml() 400 assertEquals(expectedStart, spanned.getSpanStart(spans[0])); in testMarkupFromHtml() [all …]
|
D | TextUtilsTest.java | 280 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); in testConcat() local 281 assertEquals(2, spans.length); in testConcat() 282 assertTrue(spans[0] instanceof URLSpan); in testConcat() 283 assertEquals(url, ((URLSpan) spans[0]).getURL()); in testConcat() 284 assertTrue(spans[1] instanceof BackgroundColorSpan); in testConcat() 285 assertEquals(Color.GREEN, ((BackgroundColorSpan) spans[1]).getBackgroundColor()); in testConcat() 312 final Object[] spans = result.getSpans(0, result.length(), Object.class); in testConcat_NullParameters() local 313 assertEquals(1, spans.length); in testConcat_NullParameters() 314 assertSame(span, spans[0]); in testConcat_NullParameters() 315 assertEquals(0, result.getSpanStart(spans[0])); in testConcat_NullParameters() [all …]
|
D | BidiFormatterTest.java | 262 Object[] spans; in testCharSequenceApis() local 266 spans = wrapped.getSpans(0, wrapped.length(), Object.class); in testCharSequenceApis() 267 assertEquals(1, spans.length); in testCharSequenceApis() 268 assertEquals(RELATIVE_SIZE_SPAN, spans[0]); in testCharSequenceApis() 274 spans = wrapped.getSpans(0, wrapped.length(), Object.class); in testCharSequenceApis() 275 assertEquals(1, spans.length); in testCharSequenceApis() 276 assertEquals(RELATIVE_SIZE_SPAN, spans[0]); in testCharSequenceApis() 282 spans = wrapped.getSpans(0, wrapped.length(), Object.class); in testCharSequenceApis() 283 assertEquals(1, spans.length); in testCharSequenceApis() 284 assertEquals(RELATIVE_SIZE_SPAN, spans[0]); in testCharSequenceApis() [all …]
|
D | PrecomputedTextTest.java | 220 final LocaleSpan[] spans = s.getSpans(0, s.length(), LocaleSpan.class); in testSpannedInterface_Spanned() local 221 assertNotNull(spans); in testSpannedInterface_Spanned() 222 assertEquals(1, spans.length); in testSpannedInterface_Spanned() 223 assertEquals(SPAN, spans[0]); in testSpannedInterface_Spanned() 242 final BackgroundColorSpan[] spans = s.getSpans(0, s.length(), BackgroundColorSpan.class); in testSpannedInterface_Spannable() local 273 LocaleSpan[] spans = s.getSpans(0, s.length(), LocaleSpan.class); in testSpannedInterface_String() local 274 assertNotNull(spans); in testSpannedInterface_String() 275 assertEquals(0, spans.length); in testSpannedInterface_String()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextActionTest.java | 458 T spans[] = ((Spanned) accessibilityTextWithSpan) in findSingleSpanInViewWithText() local 460 assertEquals(1, spans.length); in findSingleSpanInViewWithText() 461 return spans[0]; in findSingleSpanInViewWithText()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewTest.java | 545 URLSpan[] spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() local 546 assertNotNull(spans); in testAccessAutoLinkMask() 547 assertEquals(2, spans.length); in testAccessAutoLinkMask() 548 assertEquals("http://www.google.com", spans[0].getURL()); in testAccessAutoLinkMask() 549 assertEquals("mailto:account@gmail.com", spans[1].getURL()); in testAccessAutoLinkMask() 561 spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() 562 assertNotNull(spans); in testAccessAutoLinkMask() 563 assertEquals(1, spans.length); in testAccessAutoLinkMask() 564 assertEquals("tel:+41448008999", spans[0].getURL()); in testAccessAutoLinkMask() 4665 URLSpan[] spans = mTextView.getUrls(); in testGetUrls() local [all …]
|