Search in sources :

Example 96 with MediumTest

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));
}
Also used : TextView(android.widget.TextView) View(android.view.View) UiThreadTest(android.test.UiThreadTest) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 97 with MediumTest

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);
}
Also used : StubbedView(android.view.StubbedView) StubbedView(android.view.StubbedView) View(android.view.View) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 98 with MediumTest

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);
}
Also used : ViewStub(android.view.ViewStub) StubbedView(android.view.StubbedView) StubbedView(android.view.StubbedView) View(android.view.View) UiThreadTest(android.test.UiThreadTest) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 99 with MediumTest

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();
        }
    }
}
Also used : LLOfButtons2(android.widget.layout.linear.LLOfButtons2) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 100 with MediumTest

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());
}
Also used : View(android.view.View) ListView(android.widget.ListView) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Aggregations

MediumTest (android.test.suitebuilder.annotation.MediumTest)996 View (android.view.View)246 ListView (android.widget.ListView)150 Cursor (android.database.Cursor)116 Handler (android.os.Handler)116 Suppress (android.test.suitebuilder.annotation.Suppress)69 TextView (android.widget.TextView)67 ContentValues (android.content.ContentValues)63 ServiceStatus (com.vodafone360.people.service.ServiceStatus)60 SQLiteCursor (android.database.sqlite.SQLiteCursor)54 SQLiteStatement (android.database.sqlite.SQLiteStatement)49 IOException (java.io.IOException)49 UiThreadTest (android.test.UiThreadTest)48 LogRec (com.android.internal.util.StateMachine.LogRec)42 ContentResolver (android.content.ContentResolver)37 Intent (android.content.Intent)36 Message (android.os.Message)36 GridView (android.widget.GridView)36 InputStream (java.io.InputStream)36 ByteArrayInputStream (java.io.ByteArrayInputStream)35