testShowForNewLink_focusTextToDisplayOnOpenIfEmpty(document = undefined) {
    mockCtrl.$replayAll();
    setUpAnchor('', '', true);  // Must be done before creating the dialog.
    createAndShow(
        document, undefined /* opt_openInNewWindow */,
        undefined /*  opt_noFollow */,
        true /* opt_focusTextToDisplayOnOpenIfEmpty */);

    assertEquals(
        'Display text input field should be empty', '', getDisplayInputText());
    assertEquals('Url input field should be empty', '', getUrlInputText());
    assertEquals(
        'On the web tab should be selected', LinkDialog.Id_.ON_WEB,
        dialog.curTabId_);
    if (useActiveElement()) {
      assertEquals(
          'Focus should be on text to display input', getDisplayInput(),
          dialog.dom.getActiveElement());
    }

    mockCtrl.$verifyAll();
  }
Tests that when you show the dialog for a new link, if the text to display
is empty and focusTextToDisplayOnOpenIfEmpty is set, the input fields are
empty, the web tab is selected and focus is in the text to display input
field.
@param {Document=} document Document to render the dialog into. Defaults to
    the main window's document.
@suppress {visibility,checkTypes,missingProperties} suppression added to
enable type checking