Methods Summary |
---|
public void | setUp()
super.setUp();
final Disabled a = getActivity();
mDisabled = (Button) a.findViewById(R.id.disabledButton);
mDisabled.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
mClicked = true;
}
});
mDisabledParent = a.findViewById(R.id.clickableParent);
mDisabledParent.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
mParentClicked = true;
}
});
|
protected void | tearDown()
super.tearDown();
mClicked = false;
mParentClicked = false;
|
public void | testKeypadClick()
sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
getInstrumentation().waitForIdleSync();
assertFalse(mClicked);
assertFalse(mParentClicked);
|
public void | testSetUpConditions()
assertNotNull(mDisabled);
assertNotNull(mDisabledParent);
assertFalse(mDisabled.isEnabled());
assertTrue(mDisabledParent.isEnabled());
assertTrue(mDisabled.hasFocus());
|
public void | testTouchClick()
TouchUtils.clickView(this, mDisabled);
getInstrumentation().waitForIdleSync();
assertFalse(mClicked);
assertFalse(mParentClicked);
|