testCloseSubMenuBehavior() {
    const node = dom.getElement('demoMenuButton');
    menuButton.decorate(node);
    const menu = menuButton.getMenu();
    const subMenu = new SubMenu('Submenu');
    menu.addItem(subMenu);
    subMenu.getElement().id = 'subMenu';
    const subMenuMenu = new Menu();
    subMenu.setMenu(subMenuMenu);
    const subMenuItem = new MenuItem('Submenu item 1');
    subMenuMenu.addItem(subMenuItem);
    subMenuItem.getElement().id = 'subMenuItem1';
    menuButton.setOpen(true);

    for (let i = 0; i < 4; i++) {
      menuButton.handleKeyEvent(new MyFakeEvent(KeyCodes.DOWN));
    }
    assertEquals(
        'Submenu must be the aria-activedescendant', 'subMenu',
        aria.getState(menuButton.getElement(), State.ACTIVEDESCENDANT));

    menuButton.handleKeyEvent(new MyFakeEvent(KeyCodes.RIGHT));
    assertEquals(
        'Submenu item 1 must be the aria-activedescendant', 'subMenuItem1',
        aria.getState(menuButton.getElement(), State.ACTIVEDESCENDANT));

    menuButton.handleKeyEvent(new MyFakeEvent(KeyCodes.LEFT));
    assertEquals(
        'Submenu must be the aria-activedescendant', 'subMenu',
        aria.getState(menuButton.getElement(), State.ACTIVEDESCENDANT));
  }
Open the menu, enter a submenu and then back out of it.
Check if the aria-activedescendant property is set correctly.
@suppress {checkTypes} suppression added to enable type checking