Ejemplo n.º 1
0
 @Test
 public void testLongClickWithTwoOptions_shouldDoNothing() {
   OptionScanSelectionNode superParentNode =
       new OptionScanSelectionNode(mSelectionNode, mSelectionNode);
   mOptionManager.clearFocusIfNewTree(superParentNode);
   mOptionManager.selectOption(0);
   mOptionManager.performLongClick();
   assertEquals(0, mShadowInfo1.getPerformedActions().size());
   assertEquals(0, mShadowInfo2.getPerformedActions().size());
 }
Ejemplo n.º 2
0
 @Test
 public void testLongClickWithOneOptionThatSucceeds_shouldLongClickAndClearFocus() {
   mOptionManager.clearFocusIfNewTree(mSelectionNode);
   mOptionManager.selectOption(0);
   mOptionManager.performLongClick();
   List<Integer> info1Actions = mShadowInfo1.getPerformedActions();
   assertEquals(1, info1Actions.size());
   assertEquals(new Integer(AccessibilityNodeInfoCompat.ACTION_LONG_CLICK), info1Actions.get(0));
   verify(mOverlayController, times(3)).clearOverlay();
 }