testSpaceFireOnKeyUp() {
    const node = dom.getElement('demoMenuButton');
    menuButton.decorate(node);

    let e = new GoogEvent(KeyHandler.EventType.KEY, menuButton);
    e.preventDefault = recordFunction();
    /**
     * @suppress {strictMissingProperties} suppression added to enable type
     * checking
     */
    e.keyCode = KeyCodes.SPACE;
    menuButton.handleKeyEvent(e);
    assertFalse(
        'Menu must not have been triggered by Space keypress',
        menuButton.isOpen());
    assertNotNull(
        'Page scrolling is prevented', e.preventDefault.getLastCall());

    e = new GoogEvent(EventType.KEYUP, menuButton);
    /**
     * @suppress {strictMissingProperties} suppression added to enable type
     * checking
     */
    e.keyCode = KeyCodes.SPACE;
    menuButton.handleKeyEvent(e);
    assertTrue(
        'Menu must have been triggered by Space keyup', menuButton.isOpen());
    menuButton.getMenu().setHighlightedIndex(0);
    e = new GoogEvent(KeyHandler.EventType.KEY, menuButton);
    /**
     * @suppress {strictMissingProperties} suppression added to enable type
     * checking
     */
    e.keyCode = KeyCodes.DOWN;
    menuButton.handleKeyEvent(e);
    assertEquals(
        'Highlighted menu item must have hanged by Down keypress', 1,
        menuButton.getMenu().getHighlightedIndex());

    menuButton.getMenu().setHighlightedIndex(0);
    e = new GoogEvent(EventType.KEYUP, menuButton);
    /**
     * @suppress {strictMissingProperties} suppression added to enable type
     * checking
     */
    e.keyCode = KeyCodes.DOWN;
    menuButton.handleKeyEvent(e);
    assertEquals(
        'Highlighted menu item must not have changed by Down keyup', 0,
        menuButton.getMenu().getHighlightedIndex());
  }
Tests that space, and only space, fire on key up.
     @suppress {missingProperties} suppression added to enable type checking