testSetVisibleForEnabledFocusableControl() {
    // Hidden, enabled, focusable control becoming visible.
    control.setEnabled(true);
    control.setSupportedState(Component.State.FOCUSED, true);
    control.render(sandbox);
    assertTrue('Control must be visible', control.isVisible());

    if (testFocus) {
      // Mac Safari currently doesn't support tabIndex on arbitrary
      // elements.
      assertTrue(
          'Control must have a tab index',
          dom.isFocusableTabIndex(control.getKeyEventTarget()));

      // Visible, enabled, focusable control becoming hidden.
      control.getKeyEventTarget().focus();

      // Expected to fail on IE.
      expectedFailures.expectFailureFor(userAgent.IE);
      try {
        // IE dispatches focus and blur events asynchronously!
        assertEquals(
            'Control must have dispatched FOCUS', 1,
            getEventCount(control, Component.EventType.FOCUS));
        assertTrue('Control must have keyboard focus', control.isFocused());
      } catch (e) {
        expectedFailures.handleException(e);
      }

      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));

      // Expected to fail on IE.
      expectedFailures.expectFailureFor(userAgent.IE);
      try {
        // IE dispatches focus and blur events asynchronously!
        assertEquals(
            'Control must have dispatched BLUR', 1,
            getEventCount(control, Component.EventType.BLUR));
        assertFalse(
            'Control must no longer have keyboard focus', control.isFocused());
      } catch (e) {
        expectedFailures.handleException(e);
      }
    }
  }
Tests {@link Control#setVisible} for enabled focusable controls.