testSetEnabledWithParent() {
    const child = new Control(null);
    child.setDispatchTransitionEvents(Component.State.ALL, true);
    control.addChild(child, true /* opt_render */);
    control.setEnabled(false);

    resetEventCount();

    assertFalse('Parent must be disabled', control.isEnabled());
    assertTrue('Child must be enabled', child.isEnabled());

    child.setEnabled(false);
    assertTrue(
        'No events must have been dispatched when child is disabled',
        noEventsDispatched());
    assertTrue('Child must still be enabled', child.isEnabled());

    resetEventCount();

    control.setEnabled(true);
    assertEquals(
        'One ENABLE event must have been dispatched by the parent', 1,
        getEventCount(control, Component.EventType.ENABLE));
    assertTrue('Parent must be enabled', control.isEnabled());
    assertTrue('Child must still be enabled', child.isEnabled());

    resetEventCount();

    child.setEnabled(false);
    assertEquals(
        'One DISABLE event must have been dispatched by the child', 1,
        getEventCount(child, Component.EventType.DISABLE));
    assertTrue('Parent must still be enabled', control.isEnabled());
    assertFalse('Child must now be disabled', child.isEnabled());

    resetEventCount();

    control.setEnabled(false);
    assertEquals(
        'One DISABLE event must have been dispatched by the parent', 1,
        getEventCount(control, Component.EventType.DISABLE));
    assertFalse('Parent must now be disabled', control.isEnabled());
    assertFalse('Child must still be disabled', child.isEnabled());

    child.dispose();
  }
Tests {@link Control#setEnabled} when the control has a parent.