public void test(TestHarness harness)
{
MyTestList l = new MyTestList(new String[]{"item"});
TestList.AccessibleTestList al =
(TestList.AccessibleTestList) l.getAccessibleContext();
AccessibleComponent child = (AccessibleComponent) al.getAccessibleChild(0);
AccessibleContext ctx = (AccessibleContext) child;
AccessibleStateSet states;
l.first = 0;
l.last = 0;
l.showing = true;
harness.check(child.isShowing(), true);
states = ctx.getAccessibleStateSet();
harness.check(states.contains(AccessibleState.SHOWING));
l.showing = false;
harness.check(child.isShowing(), false);
states = ctx.getAccessibleStateSet();
harness.check(!states.contains(AccessibleState.SHOWING));
// Make list child invisible. Should make isShowing false in all cases.
l.first = 1;
l.last = 1;
l.showing = true;
harness.check(child.isShowing(), false);
states = ctx.getAccessibleStateSet();
harness.check(!states.contains(AccessibleState.SHOWING));
l.showing = false;
harness.check(child.isShowing(), false);
states = ctx.getAccessibleStateSet();
harness.check(!states.contains(AccessibleState.SHOWING));
}