testWebTestButtonPreventDefault() {
    mockCtrl.$replayAll();
    setUpAnchor(ANCHOR_URL, ANCHOR_TEXT);
    createAndShow();

    events.listen(dialog, LinkDialog.EventType.BEFORE_TEST_LINK, (e) => {
      assertEquals(e.url, ANCHOR_URL);
      e.preventDefault();
    });
    /** @suppress {visibility} suppression added to enable type checking */
    const testLink = testingDom.findTextNode(
        messages.MSG_TEST_THIS_LINK, dialog.dialogInternal_.getElement());
    testingEvents.fireClickSequence(testLink.parentNode);

    mockCtrl.$verifyAll();
  }
Test that clicking on the test button does not open a new window when
the event is canceled.