Methods Summary |
---|
public void | setUp()
super.setUp();
final Longpress a = getActivity();
mSimpleView = a.findViewById(R.id.simple_view);
mSimpleView.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick(View v) {
mLongClicked = true;
return true;
}
});
|
protected void | tearDown()
super.tearDown();
mLongClicked = false;
|
public void | testKeypadLongClick()
mSimpleView.requestFocus();
getInstrumentation().waitForIdleSync();
KeyUtils.longClick(this);
getInstrumentation().waitForIdleSync();
assertTrue(mLongClicked);
|
public void | testSetUpConditions()
assertNotNull(mSimpleView);
assertTrue(mSimpleView.hasFocus());
assertFalse(mLongClicked);
|
public void | testTouchLongClick()
TouchUtils.longClickView(this, mSimpleView);
getInstrumentation().waitForIdleSync();
assertTrue(mLongClicked);
|