testBug2215546() {
    setUpRealEditableField();

    const elem = fieldObj.getElement();
    fieldObj.setSafeHtml(
        false,
        SafeHtml.create('div', {}, SafeHtml.create('a', {'href': '/'}, '')));
    anchorElem = elem.firstChild.firstChild;
    linkObj = new Link(anchorElem, true);

    const helper = new TestHelper(elem);
    // Select "</a>" in a way, simulating what IE does if you hit enter
    // twice, arrow up into the blank line and open the link dialog.
    helper.select(anchorElem, 0, elem.firstChild, 1);

    plugin.execCommand(Command.MODAL_LINK_EDITOR, linkObj);
    /**
     * @suppress {visibility,strictMissingProperties} suppression added to
     * enable type checking
     */
    dom.getElement(LinkDialog.Id_.TEXT_TO_DISPLAY).value = 'foo';
    /**
     * @suppress {visibility,strictMissingProperties} suppression added to
     * enable type checking
     */
    dom.getElement(LinkDialog.Id_.ON_WEB_INPUT).value = 'foo';
    /** @suppress {visibility} suppression added to enable type checking */
    const okButton = plugin.dialog_.getOkButtonElement();
    okButton.disabled = false;
    events.fireClickSequence(okButton);

    assertEquals(
        'Link text should have been inserted', 'foo', anchorElem.innerHTML);
  }
Regression test for http://b/issue?id=2215546 .