use of android.test.suitebuilder.annotation.MediumTest in project platform_frameworks_base by android.
the class ViewGroupChildrenTest method testAddChildInMiddle.
@UiThreadTest
@MediumTest
public void testAddChildInMiddle() throws Exception {
// 24 should be greater than ViewGroup.ARRAY_CAPACITY_INCREMENT
for (int i = 0; i < 24; i++) {
View view = createView(String.valueOf(i + 1));
mGroup.addView(view);
}
View view = createView("X");
mGroup.addView(view, 12);
assertEquals(25, mGroup.getChildCount());
ViewAsserts.assertGroupIntegrity(mGroup);
ViewAsserts.assertGroupContains(mGroup, view);
assertSame(view, mGroup.getChildAt(12));
}
use of android.test.suitebuilder.annotation.MediumTest in project platform_frameworks_base by android.
the class ViewStubTest method testStubbed.
@MediumTest
public void testStubbed() throws Exception {
final StubbedView activity = getActivity();
final View stub = activity.findViewById(R.id.viewStub);
assertNotNull("The ViewStub does not exist", stub);
}
use of android.test.suitebuilder.annotation.MediumTest in project platform_frameworks_base by android.
the class ViewStubTest method testInflated.
@UiThreadTest
@MediumTest
public void testInflated() throws Exception {
final StubbedView activity = getActivity();
final ViewStub stub = (ViewStub) activity.findViewById(R.id.viewStub);
final View swapped = stub.inflate();
assertNotNull("The inflated view is null", swapped);
}
use of android.test.suitebuilder.annotation.MediumTest in project platform_frameworks_base by android.
the class ChangeTouchModeTest method testTouchModeFalseAcrossActivites.
@MediumTest
public void testTouchModeFalseAcrossActivites() throws Exception {
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();
}
}
}
use of android.test.suitebuilder.annotation.MediumTest in project platform_frameworks_base by android.
the class ListTouchManyTest method testNoScroll.
@MediumTest
public void testNoScroll() {
View firstChild = mListView.getChildAt(0);
View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
int firstTop = firstChild.getTop();
TouchUtils.dragViewBy(this, lastChild, Gravity.TOP | Gravity.LEFT, 0, -(ViewConfiguration.getTouchSlop()));
View newFirstChild = mListView.getChildAt(0);
assertEquals("View scrolled too early", firstTop, newFirstChild.getTop());
assertEquals("Wrong view in first position", 0, newFirstChild.getId());
}
Aggregations