testEnteringChildCancelsDismiss() {
    const submenu = new SubMenu('submenu');
    submenu.isInDocument = functions.TRUE;
    submenu.addItem(new MenuItem('submenu item 1'));
    menu.addItem(submenu);

    mockClock = new MockClock(true);
    submenu.getMenu().setVisible(true);

    // This starts the dismiss timer.
    submenu.setHighlighted(false);

    // This should cancel the dismiss timer.
    submenu.getMenu().dispatchEvent(Component.EventType.ENTER);

    // Tick the length of the dismiss timer.
    mockClock.tick(SubMenu.MENU_DELAY_MS);

    // Check that the menu is now highlighted and still visible.
    assertTrue(submenu.getMenu().isVisible());
    assertTrue(submenu.isHighlighted());
  }
Tests that entering a child menu cancels the dismiss timer for the
     submenu.