/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 | 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 | TextUtilsTest.java | 296 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); in testConcat() local 297 assertEquals(2, spans.length); in testConcat() 298 assertTrue(spans[0] instanceof URLSpan); in testConcat() 299 assertEquals(url, ((URLSpan) spans[0]).getURL()); in testConcat() 300 assertTrue(spans[1] instanceof BackgroundColorSpan); in testConcat() 301 assertEquals(Color.GREEN, ((BackgroundColorSpan) spans[1]).getBackgroundColor()); in testConcat() 330 final Object[] spans = result.getSpans(0, result.length(), Object.class); in testConcat_NullParameters() local 331 assertEquals(1, spans.length); in testConcat_NullParameters() 332 assertSame(span, spans[0]); in testConcat_NullParameters() 333 assertEquals(0, result.getSpanStart(spans[0])); in testConcat_NullParameters() [all …]
|
D | PrecomputedTextTest.java | 269 final LocaleSpan[] spans = s.getSpans(0, s.length(), LocaleSpan.class); in testSpannedInterface_Spanned() local 270 assertNotNull(spans); in testSpannedInterface_Spanned() 271 assertEquals(1, spans.length); in testSpannedInterface_Spanned() 272 assertEquals(SPAN, spans[0]); in testSpannedInterface_Spanned() 291 final BackgroundColorSpan[] spans = s.getSpans(0, s.length(), BackgroundColorSpan.class); in testSpannedInterface_Spannable() local 322 LocaleSpan[] spans = s.getSpans(0, s.length(), LocaleSpan.class); in testSpannedInterface_String() local 323 assertNotNull(spans); in testSpannedInterface_String() 324 assertEquals(0, spans.length); in testSpannedInterface_String()
|
/cts/tests/tests/text/src/android/text/style/cts/ |
D | LineBreakConfigSpanTest.kt | 477 var spans = requireNotNull(parceledText.getSpans(1, 2, LineBreakConfigSpan::class.java)) in testLineBreakConfigSpan_parcelable() variable 478 assertThat(spans.size).isEqualTo(1) in testLineBreakConfigSpan_parcelable() 479 var span = spans[0] in testLineBreakConfigSpan_parcelable() 482 spans = requireNotNull(parceledText.getSpans(2, 3, LineBreakConfigSpan::class.java)) in testLineBreakConfigSpan_parcelable() 483 assertThat(spans.size).isEqualTo(1) in testLineBreakConfigSpan_parcelable() 484 span = spans[0] in testLineBreakConfigSpan_parcelable() 487 spans = requireNotNull(parceledText.getSpans(3, 4, LineBreakConfigSpan::class.java)) in testLineBreakConfigSpan_parcelable() 488 assertThat(spans.size).isEqualTo(1) in testLineBreakConfigSpan_parcelable() 489 span = spans[0] in testLineBreakConfigSpan_parcelable() 504 var spans = requireNotNull(text.getSpans(1, 2, LineBreakConfigSpan::class.java)) in testLineBreakConfigSpan_resource() variable [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewStyleShortcutTest.java | 129 StyleSpan[] spans = spanned.getSpans(0, spanned.length(), StyleSpan.class); in assertBoldRegion() local 130 for (int i = 0; i < spans.length; ++i) { in assertBoldRegion() 131 final StyleSpan span = spans[i]; in assertBoldRegion() 147 StyleSpan[] spans = spanned.getSpans(0, spanned.length(), StyleSpan.class); in assertItalicRegion() local 148 for (int i = 0; i < spans.length; ++i) { in assertItalicRegion() 149 final StyleSpan span = spans[i]; in assertItalicRegion() 164 UnderlineSpan[] spans = spanned.getSpans(0, spanned.length(), UnderlineSpan.class); in assertUnderlineRegion() local 165 Range[] actualRanges = new Range[spans.length]; in assertUnderlineRegion() 166 for (int i = 0; i < spans.length; ++i) { in assertUnderlineRegion() 167 final UnderlineSpan span = spans[i]; in assertUnderlineRegion()
|
D | TextViewTest.java | 728 URLSpan[] spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() local 729 assertNotNull(spans); in testAccessAutoLinkMask() 730 assertEquals(2, spans.length); in testAccessAutoLinkMask() 731 assertEquals("http://www.google.com", spans[0].getURL()); in testAccessAutoLinkMask() 732 assertEquals("mailto:account@gmail.com", spans[1].getURL()); in testAccessAutoLinkMask() 744 spans = spanString.getSpans(0, spanString.length(), URLSpan.class); in testAccessAutoLinkMask() 745 assertNotNull(spans); in testAccessAutoLinkMask() 746 assertEquals(1, spans.length); in testAccessAutoLinkMask() 747 assertEquals("tel:+41448008999", spans[0].getURL()); in testAccessAutoLinkMask() 4894 URLSpan[] spans = mTextView.getUrls(); in testGetUrls() local [all …]
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | InputMethodSubtypeTest.java | 146 Object[] spans = in testSubtypeNameOverrideParcel() local 148 assertThat(spans.length).isEqualTo(1); in testSubtypeNameOverrideParcel() 149 assertThat(subtypeNameSpannable.getSpanStart(spans[0])).isEqualTo(3); in testSubtypeNameOverrideParcel() 150 assertThat(subtypeNameSpannable.getSpanEnd(spans[0])).isEqualTo(5); in testSubtypeNameOverrideParcel()
|
D | SpellCheckerTest.kt | 704 val spans = editable.getSpans(0, editable.length, SuggestionSpan::class.java) in <lambda>() constant 705 return spans in <lambda>()
|
/cts/tests/tests/textclassifier/src/android/view/textclassifier/cts/ |
D | TextViewIntegrationTest.java | 156 TextLinks.TextLinkSpan[] spans = linkifiedText.getSpans(0, TEXT.length(), in smartLinkify() 158 assertThat(spans).hasLength(1); in smartLinkify()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextActionTest.java | 626 T spans[] = ((Spanned) accessibilityTextWithSpan) in findSingleSpanInViewWithText() local 628 assertEquals(1, spans.length); in findSingleSpanInViewWithText() 629 return spans[0]; in findSingleSpanInViewWithText()
|
/cts/tests/autofillservice/src/android/autofillservice/cts/testcore/ |
D | UiBot.java | 1392 final URLSpan[] spans = ((Spanned) accessibilityTextWithSpan) 1394 return spans[0];
|