function mockWindowOpen(mockForm) {
  const windowOpen = () => ({
    document: {
      createElement: function(name) {
        if (name == 'form') {
          return Object.assign(mockForm, {
            tagName: 'FORM',
            namespaceURI: 'http://www.w3.org/1999/xhtml',
            nodeType: Node.ELEMENT_NODE,
          });
        }
        return {};
      },
    },
  });
  stubs.setPath('goog.window.openBlank', windowOpen);
}
Sets up a mocked version of goog.window.openBlank.
@param {!Object} mockForm A mocked form Object to return on
    createElement('form').