function doTestOpenWindow(noreferrer, urlParam, encodeUrlParam_opt) {
  if (encodeUrlParam_opt) {
    urlParam = encodeURIComponent(urlParam);
  }
  // TODO(mlourenco): target is set because goog.window.open() will currently
  // allow it to be undefined, which in IE seems to result in the same window
  // being reused, instead of a new one being created. If goog.window.open()
  // is fixed to use "_blank" by default then target can be removed here.
  newWin = googWindow.open(
      REDIRECT_URL_PREFIX + urlParam,
      {'noreferrer': noreferrer, 'target': '_blank'});

  return waitForTestWindow(newWin).then((win) => {
    verifyWindow(win, noreferrer, urlParam);
  });
}
Opens a window and then verifies that the new window has the expected
properties.
@param {boolean} noreferrer Whether to test the noreferrer option.
@param {string} urlParam Url param to append to the url being opened.
@param {boolean=} encodeUrlParam_opt Whether to percent-encode urlParam. This
    is needed because IE will not encode it automatically like other browsers
    browser and the Closure test server will 400 on certain characters in the
    URL (like '<' and '"').
@return {!GoogPromise} Promise that resolves once the test is complete.