testDebounceSelectionChange() {
    mockClock = new MockClock(true);
    // Initial time is 0 which evaluates to false in debouncing implementation.
    mockClock.tick(1);

    setUpRealEditableField();

    // Set up a mock event handler to make sure selection change isn't fired
    // more than once on close and a second time on close.
    let count = 0;
    fieldObj.addEventListener(Field.EventType.SELECTIONCHANGE, (e) => {
      count++;
    });

    assertEquals(0, count);
    plugin.execCommand(COMMAND);
    assertEquals(1, count);
    plugin.getDialog().hide();
    assertEquals(2, count);

    // Fake the keyup event firing on the field after the dialog closes.
    /** @suppress {visibility} suppression added to enable type checking */
    const e = new GoogEvent('keyup', plugin.fieldObject.getElement());
    /**
     * @suppress {strictMissingProperties} suppression added to enable type
     * checking
     */
    e.keyCode = 13;
    events.fireBrowserEvent(e);

    // Tick the mock clock so that selection change tries to fire.
    mockClock.tick(Field.SELECTION_CHANGE_FREQUENCY_ + 1);

    // Ensure the handler did not fire again.
    assertEquals(2, count);
  }
Tests that after the dialog is hidden via a keystroke, the editable field
doesn't fire an extra SELECTIONCHANGE event due to the keyup from that
keystroke.
There is also a robot test in dialog_robot.html to test debouncing the
SELECTIONCHANGE event when the dialog closes.
@suppress {visibility,checkTypes} suppression added to enable type checking