testExecCommandException() {
    const mockField = new StrictMock(Field);
    plugin.registerFieldObject(mockField);
    /**
     * @suppress {visibility,duplicate} suppression added to enable type
     * checking
     */
    plugin.execCommandInternal = () => {
      throw 1;
    };

    if (userAgent.GECKO) {
      mockField.stopChangeEvents(true, true);
    }
    mockField.dispatchBeforeChange();
    // Note(user): dispatch change turns back on (delayed) change events.
    mockField.dispatchChange();
    mockField.dispatchSelectionChangeEvent();
    mockField.$replay();

    assertThrows('Exception should not be swallowed', () => {
      plugin.execCommand();
    });

    // Verifies that cleanup is done despite the exception.
    mockField.$verify();
  }
Regression test for http://b/issue?id=1471355 .
     @suppress {missingProperties} suppression added to enable type checking