function fireMouseDownAndFocus(element, button = undefined) {
  /** @suppress {checkTypes} suppression added to enable type checking */
  const result = testingEvents.fireMouseDownEvent(element, button);
  if (result) {
    // Browsers move focus for all buttons, not just the left button.
    element.focus();
  }
  return result;
}
Simulates a mousedown event on the given element, including focusing it.
@param {Element} element Element on which to simulate mousedown.
@param {BrowserEvent.MouseButton=} button Mouse button; defaults to
    `BrowserEvent.MouseButton.LEFT`.
@return {boolean} Whether the event was allowed to proceed.