testSetVisibleForEnabledNonFocusableControl() {
    // Hidden, enabled, non-focusable control becoming visible.
    control.setEnabled(true);
    control.setSupportedState(Component.State.FOCUSED, false);
    control.render(sandbox);
    assertTrue('Control must be visible', control.isVisible());
    assertFalse(
        'Control must not have a tab index',
        dom.isFocusableTabIndex(control.getKeyEventTarget()));

    if (testFocus) {
      // Visible, enabled, non-focusable control becoming hidden.
      control.getKeyEventTarget().focus();
      assertEquals(
          'Control must not have dispatched FOCUS', 0,
          getEventCount(control, Component.EventType.FOCUS));
      assertFalse('Control must not have keyboard focus', control.isFocused());
      control.setVisible(false);
      assertFalse('Control must be hidden', control.isVisible());
      assertFalse(
          'Control must not have a tab index',
          dom.isFocusableTabIndex(control.getKeyEventTarget()));
      assertEquals(
          'Control must have dispatched HIDE', 1,
          getEventCount(control, Component.EventType.HIDE));
      assertEquals(
          'Control must not have dispatched BLUR', 0,
          getEventCount(control, Component.EventType.BLUR));
    }
  }
Tests {@link Control#setVisible} for enabled non-focusable
controls.