ChangeTouchModeTestpublic class ChangeTouchModeTest extends android.test.ActivityInstrumentationTestCase Tests that the touch mode changes from various events, and that the state
persists across activities. |
Constructors Summary |
---|
public ChangeTouchModeTest()
super("com.android.frameworks.coretests", LLOfButtons1.class);
|
Methods Summary |
---|
public void | DISABLE_testDpadDirectionLeavesTouchMode()
assertInTouchModeAfterClick(this, getActivity().getFirstButton());
sendKeys(KeyEvent.KEYCODE_DPAD_RIGHT);
assertNotInTouchModeAfterKey(this, KeyEvent.KEYCODE_DPAD_RIGHT, getActivity().getFirstButton());
assertFalse("touch mode", getActivity().isInTouchMode());
| public void | TODO_touchTrackBallMovementLeavesTouchMode()
| protected void | setUp()
super.setUp();
| public void | testPreconditions()
assertFalse("touch mode", getActivity().isInTouchMode());
| public void | testTouchModeChangedInOtherActivity()
assertFalse("touch mode", getActivity().isInTouchMode());
LLOfButtons2 otherActivity = null;
try {
otherActivity =
launchActivity("com.android.frameworks.coretests", LLOfButtons2.class, null);
assertNotNull(otherActivity);
assertFalse(otherActivity.isInTouchMode());
assertInTouchModeAfterClick(this, otherActivity.getFirstButton());
assertTrue(otherActivity.isInTouchMode());
} finally {
if (otherActivity != null) {
otherActivity.finish();
}
}
// need to wait for async update back to window to occur
Thread.sleep(200);
assertTrue("touch mode", getActivity().isInTouchMode());
| public void | testTouchModeFalseAcrossActivites()
getInstrumentation().waitForIdleSync();
LLOfButtons2 otherActivity = null;
try {
otherActivity =
launchActivity("com.android.frameworks.coretests", LLOfButtons2.class, null);
assertNotNull(otherActivity);
assertFalse(otherActivity.isInTouchMode());
} finally {
if (otherActivity != null) {
otherActivity.finish();
}
}
| public void | testTouchModeTrueAcrossActivites()
assertInTouchModeAfterClick(this, getActivity().getFirstButton());
LLOfButtons2 otherActivity = null;
try {
otherActivity =
launchActivity("com.android.frameworks.coretests", LLOfButtons2.class, null);
assertNotNull(otherActivity);
assertTrue(otherActivity.isInTouchMode());
} finally {
if (otherActivity != null) {
otherActivity.finish();
}
}
| public void | testTouchingScreenEntersTouchMode()
assertInTouchModeAfterTap(this, getActivity().getFirstButton());
assertTrue("touch mode", getActivity().isInTouchMode());
|
|