FileDocCategorySizeDatePackage
ButtonAboveTallInternalSelectionViewTest.javaAPI DocAndroid 1.5 API2527Wed May 06 22:42:02 BST 2009com.android.frameworktest.scroll

ButtonAboveTallInternalSelectionViewTest

public class ButtonAboveTallInternalSelectionViewTest extends android.test.ActivityInstrumentationTestCase

Fields Summary
Constructors Summary
public ButtonAboveTallInternalSelectionViewTest()

        super("com.android.frameworktest", ButtonAboveTallInternalSelectionView.class);
    
Methods Summary
public voidtestMovingFocusDownToItemTallerThanScreenStillOnScreen()

        sendKeys(KeyEvent.KEYCODE_DPAD_DOWN);
        getInstrumentation().waitForIdleSync();

        final InternalSelectionView isv = getActivity().getIsv();
        assertTrue("internal selection view should have taken focus",
                isv.isFocused());
        assertEquals("internal selection view selected row",
                0, isv.getSelectedRow());
        assertTrue("top of ISV should still be on screen",
                getActivity().getIsv().getTop() >
                getActivity().getScrollView().getScrollY());
    
public voidtestPreconditions()

        assertTrue("expecting the top button to have focus",
                getActivity().getButtonAbove().isFocused());
        assertEquals("scrollview scroll y",
                0,
                getActivity().getScrollView().getScrollY());
        assertTrue("internal selection view should be taller than screen",
                getActivity().getIsv().getHeight() > getActivity().getScrollView().getHeight());

        assertTrue("top of ISV should be on screen",
                getActivity().getIsv().getTop() >
                getActivity().getScrollView().getScrollY());