testClearUndoHistory() {
    const undoRedoPlugin = new UndoRedo();
    editableField.registerPlugin(undoRedoPlugin);
    editableField.makeEditable();

    editableField.dispatchChange();
    clock.tick(10000);

    dom.setTextContent(editableField.getElement(), 'y');
    editableField.dispatchChange();
    assertFalse(undoRedoPlugin.undoManager_.hasUndoState());

    clock.tick(10000);
    assertTrue(undoRedoPlugin.undoManager_.hasUndoState());

    dom.setTextContent(editableField.getElement(), 'z');
    editableField.dispatchChange();

    let numCalls = 0;
    events.listen(editableField, Field.EventType.DELAYEDCHANGE, () => {
      numCalls++;
    });
    undoRedoPlugin.clearHistory();
    // 1 call from stopChangeEvents(). 0 calls from startChangeEvents().
    assertEquals(
        'clearHistory must not cause delayed change when none pending', 1,
        numCalls);

    clock.tick(10000);
    assertFalse(undoRedoPlugin.undoManager_.hasUndoState());
  }
@bug 1359214
@suppress {visibility} suppression added to enable type
     checking