Home
last modified time | relevance | path

Searched refs:getText (Results 1 – 25 of 252) sorted by relevance

1234567891011

/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityTextTraversalTest.java580 && event.getText().size() > 0 in testActionNextAndPreviousAtGranularityCharacterOverText()
581 && event.getText().get(0).toString().equals(getString(R.string.a_b)) in testActionNextAndPreviousAtGranularityCharacterOverText()
593 assertEquals(1, Selection.getSelectionStart(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText()
594 assertEquals(1, Selection.getSelectionEnd(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText()
614 && event.getText().size() > 0 in testActionNextAndPreviousAtGranularityCharacterOverText()
615 && event.getText().get(0).toString().equals(getString(R.string.a_b)) in testActionNextAndPreviousAtGranularityCharacterOverText()
627 assertEquals(2, Selection.getSelectionStart(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText()
628 assertEquals(2, Selection.getSelectionEnd(textView.getText())); in testActionNextAndPreviousAtGranularityCharacterOverText()
648 && event.getText().size() > 0 in testActionNextAndPreviousAtGranularityCharacterOverText()
649 && event.getText().get(0).toString().equals(getString(R.string.a_b)) in testActionNextAndPreviousAtGranularityCharacterOverText()
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DQwertyKeyListenerTest.java74 assertEquals("h", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
77 assertEquals("he", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
80 assertEquals("hel", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
83 assertEquals("hell", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
86 assertEquals("hello", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
97 assertEquals("H", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
100 assertEquals("HE", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
103 assertEquals("HEL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
106 assertEquals("HELL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
109 assertEquals("HELLO", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
[all …]
DMultiTapKeyListenerTest.java117 assertEquals("h", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
120 assertEquals("he", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
123 assertEquals("hel", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
126 assertEquals("hell", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
129 assertEquals("hello", mTextView.getText().toString()); in testOnKeyDown_capitalizeNone()
140 assertEquals("H", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
143 assertEquals("HE", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
146 assertEquals("HEL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
149 assertEquals("HELL", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
152 assertEquals("HELLO", mTextView.getText().toString()); in testOnKeyDown_capitalizeCharacters()
[all …]
DDateKeyListenerTest.java149 assertEquals("", mTextView.getText().toString()); in testDateTimeKeyListener()
153 assertEquals("1", mTextView.getText().toString()); in testDateTimeKeyListener()
157 assertEquals("12", mTextView.getText().toString()); in testDateTimeKeyListener()
163 assertEquals("12", mTextView.getText().toString()); in testDateTimeKeyListener()
168 assertEquals("12-", mTextView.getText().toString()); in testDateTimeKeyListener()
172 assertEquals("12-/", mTextView.getText().toString()); in testDateTimeKeyListener()
176 assertEquals("12-/", mTextView.getText().toString()); in testDateTimeKeyListener()
180 assertEquals("12-/", mTextView.getText().toString()); in testDateTimeKeyListener()
DDateTimeKeyListenerTest.java153 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
158 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
163 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
170 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
177 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
184 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
191 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
196 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
199 assertEquals(expectedText, mTextView.getText().toString()); in testDateTimeKeyListener()
DTimeKeyListenerTest.java152 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
157 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
162 assertEquals("12", mTextView.getText().toString()); in testTimeKeyListener()
169 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
176 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
183 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
190 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
197 assertEquals(expectedText, mTextView.getText().toString()); in testTimeKeyListener()
DDigitsKeyListenerTest.java552 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener1()
556 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener1()
560 assertEquals("1", mTextView.getText().toString()); in testDigitsKeyListener1()
564 assertEquals("1", mTextView.getText().toString()); in testDigitsKeyListener1()
568 assertEquals("12", mTextView.getText().toString()); in testDigitsKeyListener1()
587 assertEquals("", mTextView.getText().toString()); in testDigitsKeyListener2()
591 assertEquals("-", mTextView.getText().toString()); in testDigitsKeyListener2()
595 assertEquals("-1", mTextView.getText().toString()); in testDigitsKeyListener2()
599 assertEquals("-1", mTextView.getText().toString()); in testDigitsKeyListener2()
603 assertEquals("-1", mTextView.getText().toString()); in testDigitsKeyListener2()
[all …]
DNumberKeyListenerTest.java147 Selection.setSelection(mTextView.getText(), 0, 0); in testPressKey()
150 assertEquals("123456", mTextView.getText().toString()); in testPressKey()
153 assertEquals("0123456", mTextView.getText().toString()); in testPressKey()
160 assertEquals("0123456", mTextView.getText().toString()); in testPressKey()
170 assertEquals("0123456", mTextView.getText().toString()); in testPressKey()
/cts/tests/tests/widget/src/android/widget/cts/
DChronometerTest.java105 CharSequence oldText = chronometer.getText(); in testAccessBase()
109 assertNotSame(oldText, chronometer.getText()); in testAccessBase()
111 oldText = chronometer.getText(); in testAccessBase()
114 assertNotSame(oldText, chronometer.getText()); in testAccessBase()
116 oldText = chronometer.getText(); in testAccessBase()
119 assertNotSame(oldText, chronometer.getText()); in testAccessBase()
121 oldText = chronometer.getText(); in testAccessBase()
124 assertNotSame(oldText, chronometer.getText()); in testAccessBase()
137 String text = chronometer.getText().toString(); in testAccessFormat()
152 final CharSequence valueBeforeStart = chronometer.getText(); in testStartAndStop()
[all …]
DTextSwitcherTest.java99 assertEquals(viewText1, (tvChild1.getText().toString())); in testSetText()
100 assertEquals(viewText2, (tvChild2.getText().toString())); in testSetText()
105 assertEquals(viewText1, (tvChild1.getText().toString())); in testSetText()
106 assertEquals(changedText, (tvChild2.getText().toString())); in testSetText()
111 assertEquals(changedText, (tvChild1.getText().toString())); in testSetText()
112 assertEquals(changedText, (tvChild2.getText().toString())); in testSetText()
117 assertEquals(changedText, (tvChild1.getText().toString())); in testSetText()
118 assertEquals("", (tvChild2.getText().toString())); in testSetText()
139 assertEquals(viewText1, (tvChild1.getText().toString())); in testSetCurrentText()
140 assertEquals(viewText2, (tvChild2.getText().toString())); in testSetCurrentText()
[all …]
DTextViewKeyboardShortcutTest.java59 assertThat(et.getText().toString()).isEqualTo("hello"); in testUndoInvoke()
70 assertThat(et.getText().toString()).isNotEqualTo("hello"); in testUndoInvoke()
85 assertThat(et.getText().toString()).isEqualTo("hello"); in testRedoInvoke_byCtrlShiftZ()
96 assertThat(et.getText().toString()).isNotEqualTo("hello"); in testRedoInvoke_byCtrlShiftZ()
106 assertThat(et.getText().toString()).isEqualTo("hello"); in testRedoInvoke_byCtrlShiftZ()
121 assertThat(et.getText().toString()).isEqualTo("hello"); in testRedoInvoke_byCtrlY()
132 assertThat(et.getText().toString()).isNotEqualTo("hello"); in testRedoInvoke_byCtrlY()
142 assertThat(et.getText().toString()).isEqualTo("hello"); in testRedoInvoke_byCtrlY()
DRemoteViewsSizeMapTest.java146 assertEquals("1", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in apply_withoutSize_shouldReturnSmallestLayout()
153 assertEquals("1", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in apply_withSmallSize_shouldReturnSmallLayout()
160 assertEquals("4", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in apply_withLargeSize_shouldReturnLargestLayout()
167 assertEquals("2", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in apply_withSize_shouldReturnClosestFittingLayoutWithMargin()
174 assertEquals("3", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in apply_withSize_shouldReturnClosestFittingLayout()
184 assertEquals("1", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in reapply_withoutSize_shouldReturnSmallestLayout()
194 assertEquals("1", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in reapply_withSmallSize_shouldReturnSmallLayout()
204 assertEquals(mResult.<TextView>findViewById(R.id.remoteView_text).getText(), "4"); in reapply_witLargeSize_shouldReturnLargestLayout()
214 assertEquals("2", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in reapply_withSize_shouldReturnClosestFittingLayoutWithMargin()
224 assertEquals("3", mResult.<TextView>findViewById(R.id.remoteView_text).getText()); in reapply_withSize_shouldReturnClosestFittingLayout()
[all …]
DSimpleAdapterTest.java175 assertEquals("01", ((TextView) result).getText().toString()); in testGetView()
179 assertEquals("191", ((TextView) result).getText().toString()); in testGetView()
185 assertEquals("01", ((TextView) result).getText().toString()); in testGetView()
190 assertEquals("101", ((TextView) result).getText().toString()); in testGetView()
204 assertEquals("01", ((TextView) result).getText().toString()); in testGetView()
228 ((TextView) result.findViewById(android.R.id.text1)).getText().toString()); in testSetDropDownViewResource()
233 ((TextView) result.findViewById(android.R.id.text1)).getText().toString()); in testSetDropDownViewResource()
238 assertEquals("01", ((TextView) result).getText().toString()); in testSetDropDownViewResource()
242 assertEquals("191", ((TextView) result).getText().toString()); in testSetDropDownViewResource()
250 assertEquals("01", ((TextView) result).getText().toString()); in testGetDropDownView()
[all …]
DEditTextTest.java153 assertTrue(TextUtils.equals("android", mEditText1.getText())); in testAccessText()
156 assertEquals(0, mEditText1.getText().length()); in testAccessText()
159 assertEquals(0, mEditText1.getText().length()); in testAccessText()
188 mEditText1.setSelection(mEditText1.getText().length() + 1); in testSetSelectionIndexAfterLast()
225 mEditText1.setSelection(5, mEditText1.getText().length() + 1); in testSetSelectionStartEndAfterLast()
338 assertTrue(TextUtils.equals(mEditText1.getText(), mEditText2.getText())); in testOnSaveInstanceState_savesTextStateWhenFreezesTextIsTrue()
354 assertTrue(TextUtils.equals(mEditText1.getText(), mEditText2.getText())); in testOnSaveInstanceState_savesTextStateWhenFreezesTextIfFalse()
473 Editable currentText = getText(); in setText()
495 Editable text = getText(); in setOverScrollMode()
574 assertTrue(et.getText().length() <= FRAMEWORK_MAX_LENGTH_FOR_SINGLE_LINE_EDIT_TEXT); in testSingleLineMaxLength_explicit_singleLine()
[all …]
DSimpleExpandableListAdapterTest.java184 assertEquals("child00", ((TextView) result).getText().toString()); in testGetChildView()
188 assertEquals("child30", ((TextView) result).getText().toString()); in testGetChildView()
199 assertEquals("child00", ((TextView) result).getText().toString()); in testGetChildView()
204 ((TextView) result.findViewById(android.R.id.text1)).getText().toString()); in testGetChildView()
211 assertEquals("child20", ((TextView) result).getText().toString()); in testGetChildView()
218 assertEquals("child10", ((TextView) result).getText().toString()); in testGetChildView()
338 assertEquals("group00", ((TextView) result).getText().toString()); in testGetGroupView()
342 assertEquals("group30", ((TextView) result).getText().toString()); in testGetGroupView()
353 assertEquals("group00", ((TextView) result).getText().toString()); in testGetGroupView()
358 ((TextView) result.findViewById(android.R.id.text1)).getText().toString()); in testGetGroupView()
[all …]
DTabHost_TabSpecTest.java92 assertEquals(TAG_TAB2, tvTitle.getText().toString()); in testSetIndicator1()
101 assertEquals("", tvTitle.getText().toString()); in testSetIndicator1()
120 assertEquals("", tvTitle.getText().toString()); in testSetIndicator2()
132 assertEquals("", tvTitle.getText().toString()); in testSetIndicator2()
143 assertEquals("", tvTitle.getText().toString()); in testSetIndicator2()
154 assertEquals("half cube", tvTitle.getText().toString()); in testSetIndicator2()
169 currentView.getText().toString()); in testSetContent1()
190 assertEquals("tab spec 2", currentView.getText().toString()); in testSetContent2()
DTextViewTest.java302 assertEquals(expected, tv.getText().toString()); in testAccessText()
305 assertEquals("", tv.getText().toString()); in testAccessText()
520 Selection.setSelection((Editable) mTextView.getText(), in testAccessMovementMethod()
527 assertEquals(selectionStart, Selection.getSelectionStart(mTextView.getText())); in testAccessMovementMethod()
528 assertEquals(selectionEnd, Selection.getSelectionEnd(mTextView.getText())); in testAccessMovementMethod()
532 assertEquals(selectionStart, Selection.getSelectionStart(mTextView.getText())); in testAccessMovementMethod()
533 assertEquals(selectionStart, Selection.getSelectionEnd(mTextView.getText())); in testAccessMovementMethod()
537 Selection.setSelection((Editable) mTextView.getText(), in testAccessMovementMethod()
544 assertEquals(selectionStart, Selection.getSelectionStart(mTextView.getText())); in testAccessMovementMethod()
545 assertEquals(selectionEnd, Selection.getSelectionEnd(mTextView.getText())); in testAccessMovementMethod()
[all …]
/cts/tests/translation/src/android/translation/cts/unittests/
DViewTranslationRequestTest.java53 assertThat(request.getValue("sample id").getText()).isEqualTo("sample text"); in testBuilderVirtualAutofillId_validSetText()
66 assertThat(request.getValue("sample id").getText()).isEqualTo("sample text"); in testBuilder_validSetText()
81 assertThat(request.getValue("sample id").getText()).isEqualTo("text2"); in testBuilder_setTextTwice()
94 assertThat(request.getValue("sample id").getText()).isEqualTo("sample text"); in testGetValue_invalidId()
112 assertThat(request.getValue("sample id").getText()).isEqualTo("sample text"); in testBuilder_multipleTexts()
113 assertThat(request.getValue("id2").getText()).isEqualTo("text2"); in testBuilder_multipleTexts()
DTranslationResponseTest.java68 assertThat(viewResponse.getValue("sample id").getText()).isEqualTo("sample text"); in testBuilder_validViewTranslationResponse()
108 assertThat(value.getText()).isEqualTo("hello"); in testBuilder_validTranslationResponseValue()
134 assertThat(value1.getText()).isEqualTo("hello"); in testParceledResponse_validTranslationResponseValues()
138 assertThat(value2.getText()).isEqualTo("world"); in testParceledResponse_validTranslationResponseValues()
157 assertThat(viewResponse.getValue("sample id").getText()).isEqualTo("sample text"); in testBuilder_mixingAdders()
161 assertThat(value.getText()).isEqualTo("hello"); in testBuilder_mixingAdders()
185 assertThat(viewResponse.getValue("sample id").getText()).isEqualTo("sample text"); in testBuilder_mixingSetters()
189 assertThat(value.getText()).isEqualTo("hello"); in testBuilder_mixingSetters()
220 assertThat(viewResponse1.getValue("sample id").getText()).isEqualTo("sample text"); in testParceledResponse_validViewTranslationResponses()
226 assertThat(viewResponse2.getValue("id2").getText()).isEqualTo("test"); in testParceledResponse_validViewTranslationResponses()
DTranslationRequestTest.java60 assertThat(viewRequest.getValue("sample id").getText().toString()).isEqualTo("sample text"); in testBuilder_validViewTranslationRequest()
76 assertThat(value.getText().toString()).isEqualTo("hello"); in testBuilder_validTranslationRequestValue()
110 assertThat(viewRequest.getValue("sample id").getText().toString()).isEqualTo("sample text"); in testBuilder_mixingSetters()
114 assertThat(value.getText().toString()).isEqualTo("hello"); in testBuilder_mixingSetters()
137 assertThat(value1.getText().toString()).isEqualTo("hello"); in testParceledRequest_validTranslationRequestValues()
141 assertThat(value2.getText().toString()).isEqualTo("world"); in testParceledRequest_validTranslationRequestValues()
163 assertThat(viewRequest.getValue("sample id").getText().toString()).isEqualTo("sample text"); in testBuilder_sameAutofillIdViewTranslationRequests()
170 assertThat(viewRequest2.getValue("id2").getText().toString()).isEqualTo("text2"); in testBuilder_sameAutofillIdViewTranslationRequests()
198 assertThat(request1.getValue("sample id").getText().toString()).isEqualTo("sample text"); in testParceledRequest_validViewTranslationRequests()
205 assertThat(request2.getValue("id2").getText().toString()).isEqualTo("test"); in testParceledRequest_validViewTranslationRequests()
DTranslationValueTest.java42 assertThat(value.getText()).isEqualTo("sample text"); in testTranslationRequestValue_forText()
52 assertThat(value.getText()).isEqualTo("sample text"); in testTranslationResponseValue_validBuilder()
60 assertThat(value.getText()).isNull(); in testTranslationResponseValue_forError()
78 assertThat(value.getText()).isNull(); in testTranslationResponseValue_validDictionary()
134 assertThat(value.getText()).isNull(); in testTranslationResponseValue_validTransliteration()
DViewTranslationResponseTest.java55 assertThat(request.getValue("sample id").getText()).isEqualTo("sample text"); in testBuilder_validAddText()
81 assertThat(request.getValue("sample id").getText().toString()).isEqualTo("sample text"); in testGetValue_invalidId()
103 assertThat(request.getValue("sample id").getText().toString()).isEqualTo("sample text"); in testBuilder_multipleResults()
104 assertThat(request.getValue("id2").getText().toString()).isEqualTo("text2"); in testBuilder_multipleResults()
/cts/common/device-side/interactive/automation/src/main/java/com/google/android/interactive/steps/enterprise/launcher/
DIsTurnedOffWorkProfileTextReplacedWithUpdatedStringStepAutomation.java35 .className(TextView.class)).getText().equals("UPDATED STRING"); in automate()
40 .className(TextView.class)).getText().equals("UPDATED STRING"); in automate()
/cts/common/device-side/interactive/automation/src/main/java/com/google/android/interactive/steps/enterprise/sharesheet/
DIsAllTextOnWorkTabReplacedByUpdatedStringStepAutomation.java34 .className(TextView.class)).getText(); in automate()
37 .className(TextView.class)).getText(); in automate()
/cts/tests/app/src/android/app/cts/
DAlertDialogTest.java95 mPositiveButton.getText()); in doTestAlertDialog()
100 mNeutralButton.getText()); in doTestAlertDialog()
105 mNegativeButton.getText()); in doTestAlertDialog()
136 mPositiveButton.getText()); in testAlertDialogAPIWithMessage()
141 mNegativeButton.getText()); in testAlertDialogAPIWithMessage()
146 mNeutralButton.getText()); in testAlertDialogAPIWithMessage()

1234567891011