ListWithEditTextHeaderTestpublic class ListWithEditTextHeaderTest extends android.test.ActivityInstrumentationTestCase
Fields Summary |
---|
private android.widget.ListView | mListView |
Constructors Summary |
---|
public ListWithEditTextHeaderTest()
super("com.android.frameworktest", ListWithEditTextHeader.class);
|
Methods Summary |
---|
protected void | setUp()
super.setUp();
mListView = getActivity().getListView();
| public void | testClickingHeaderKeepsFocus()
TouchUtils.clickView(this, mListView.getChildAt(0));
assertTrue("header has focus", mListView.getChildAt(0).isFocused());
assertEquals("nothing selected", AbsListView.INVALID_POSITION, mListView.getSelectedItemPosition());
| public void | testClickingHeaderWhenOtherItemHasFocusGivesHeaderFocus()
sendKeys(KeyEvent.KEYCODE_DPAD_DOWN);
assertEquals("selected position", 1, mListView.getSelectedItemPosition());
TouchUtils.clickView(this, mListView.getChildAt(0));
assertTrue("header has focus", mListView.getChildAt(0).isFocused());
assertEquals("nothing selected", AbsListView.INVALID_POSITION, mListView.getSelectedItemPosition());
| public void | testPreconditions()
assertTrue("listview.getItemsCanFocus()", mListView.getItemsCanFocus());
assertFalse("out of touch-mode", mListView.isInTouchMode());
assertEquals("header view count", 1, mListView.getHeaderViewsCount());
assertTrue("header has focus", mListView.getChildAt(0).isFocused());
|
|