testShiftOverride() {
    popup.decorate(menu);
    popup.attach(
        anchor,
        /* opt_targetCorner */ undefined,
        /* opt_menuCorner */ undefined,
        /* opt_contextMenu */ false);

    popup.setShiftOverride(true);
    events.fireMouseDownEvent(
        anchor, BrowserEvent.MouseButton.RIGHT,
        /* opt_coords */ null,
        /* opt_eventProperties */ {shiftKey: true});
    assertFalse(popup.isVisible());

    popup.setShiftOverride(false);
    events.fireMouseDownEvent(
        anchor, BrowserEvent.MouseButton.RIGHT,
        /* opt_coords */ null,
        /* opt_eventProperties */ {shiftKey: true});
    assertTrue(popup.isVisible());
  }
Tests that the menu is not shown (i.e. the browser context menu overrides
the menu) if the SHIFT key is pressed when the menu is right-clicked and
the popup has shiftOverride set.