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

    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 url input', getUrlInput(),
          dialog.dom.getActiveElement());
    }

    mockCtrl.$verifyAll();
  }
Tests that when you show the dialog for a new link, the input fields are
empty, the web tab is selected and focus is in the url 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