function simulateKeyDownOnBubble(keyCode, isCtrl) {
  // In some browsers (e.g. FireFox) the editable field is marked with
  // designMode on. In the test setting (and not in production setting), the
  // bubble element shares the same window and hence the designMode. In this
  // mode, activeElement remains the <body> and isn't changed along with the
  // focus as a result of tab key.
  if (userAgent.GECKO) {
    /** @suppress {visibility} suppression added to enable type checking */
    bubblePlugin.getSharedBubble_()
        .getContentElement()
        .ownerDocument.designMode = 'off';
  }

  const event = new GoogTestingEvent(EventType.KEYDOWN, null);
  event.keyCode = keyCode;
  event.ctrlKey = isCtrl;
  return bubblePlugin.handleKeyDown(event);
}
Sends a key event to the bubble.
@param {number} keyCode
@param {boolean} isCtrl
@return {boolean} whether the bubble hanlded the event.