/cts/tests/tests/text/src/android/text/util/cts/ |
D | LinkifyTest.java | 116 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinksToSpannable() local 117 assertEquals(4, spans.length); in testAddLinksToSpannable() 118 assertEquals("http://www.google.com", spans[0].getURL()); in testAddLinksToSpannable() 119 assertEquals("http://www.google.com/language_tools?hl=en", spans[1].getURL()); in testAddLinksToSpannable() 120 assertEquals("http://a.bd", spans[2].getURL()); in testAddLinksToSpannable() 121 assertEquals("http://h." + longGTLD, spans[3].getURL()); in testAddLinksToSpannable() 124 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinksToSpannable() 125 assertEquals(1, spans.length); in testAddLinksToSpannable() 126 assertEquals("mailto:name@gmail.com", spans[0].getURL()); in testAddLinksToSpannable() 144 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 | 75 Object[] spans = spanned.getSpans(start, end, Object.class); in verifySingleTagOnWhileString() local 76 assertEquals(expectLen, spans.length); in verifySingleTagOnWhileString() 77 assertEquals(expectStart, spanned.getSpanStart(spans[0])); in verifySingleTagOnWhileString() 78 assertEquals(expectEnd, spanned.getSpanEnd(spans[0])); in verifySingleTagOnWhileString() 96 Object[] spans = spanned.getSpans(start, end, Object.class); in verifyBadHtml() local 97 assertEquals(spansLen, spans.length); in verifyBadHtml() 455 Object[] spans = spanned.getSpans(0, spanned.length(), Object.class); in testMarkupFromHtml() local 456 assertEquals(1, spans.length); in testMarkupFromHtml() 457 assertEquals(StrikethroughSpan.class, spans[0].getClass()); in testMarkupFromHtml() 458 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/tests/textclassifier/src/android/view/textclassifier/cts/ |
D | TextViewIntegrationTest.java | 164 TextLinks.TextLinkSpan[] spans = linkifiedText.getSpans(0, TEXT.length(), in smartLinkify() 166 assertThat(spans).hasLength(1); in smartLinkify() 167 TextLinks.TextLinkSpan span = spans[0]; in smartLinkify()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextActionTest.java | 612 T spans[] = ((Spanned) accessibilityTextWithSpan) in findSingleSpanInViewWithText() local 614 assertEquals(1, spans.length); in findSingleSpanInViewWithText() 615 return spans[0]; in findSingleSpanInViewWithText()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | SpellCheckerTest.kt | 641 val spans = editable.getSpans(0, editable.length, SuggestionSpan::class.java) in <lambda>() constant 642 return spans in <lambda>()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewTest.java | 668 URLSpan[] spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() local 669 assertNotNull(spans); in testAccessAutoLinkMask() 670 assertEquals(2, spans.length); in testAccessAutoLinkMask() 671 assertEquals("http://www.google.com", spans[0].getURL()); in testAccessAutoLinkMask() 672 assertEquals("mailto:account@gmail.com", spans[1].getURL()); in testAccessAutoLinkMask() 684 spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() 685 assertNotNull(spans); in testAccessAutoLinkMask() 686 assertEquals(1, spans.length); in testAccessAutoLinkMask() 687 assertEquals("tel:+41448008999", spans[0].getURL()); in testAccessAutoLinkMask() 4808 URLSpan[] spans = mTextView.getUrls(); in testGetUrls() local [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/testcore/ |
D | UiBot.java | 1250 final URLSpan[] spans = ((Spanned) accessibilityTextWithSpan) 1252 return spans[0];
|