testSubmitFormDataInNewWindow() {
    const expectedForm = [
      {name: 'in1', value: 'foo', type: 'hidden'},
      {name: 'in2', value: 'bar', type: 'hidden'},
      {name: 'in2', value: 'baaz', type: 'hidden'},
      {name: 'in3', value: '', type: 'hidden'},
      {name: 'pass', value: 'bar', type: 'hidden'},
      {name: 'textarea', value: 'foo bar baz', type: 'hidden'},
      {name: 'select1', value: '1', type: 'hidden'},
      {name: 'select2', value: 'a', type: 'hidden'},
      {name: 'select2', value: 'c', type: 'hidden'},
      {name: 'select3', value: '', type: 'hidden'},
      {name: 'checkbox1', value: 'on', type: 'hidden'},
      {name: 'radio', value: 'X', type: 'hidden'},
      {name: 'radio2', value: 'Y', type: 'hidden'},
    ];

    const formElements = [];
    const mockForm = {};

    const appendChild = HTMLFormElement.prototype.appendChild;
    const submit = HTMLFormElement.prototype.submit;
    /**
     * @suppress {missingReturn} suppression added to enable type checking
     */
    HTMLFormElement.prototype.appendChild = (child) => {
      formElements.push(child);
    };
    /**
     * @suppress {missingProperties} suppression added to enable type
     * checking
     */
    HTMLFormElement.prototype.submit = () => {
      assertArrayEquals(expectedForm, formElements);
      assertEquals('https://foo.bar/baz', mockForm.action);
      assertEquals('get', mockForm.method);
    };
    mockWindowOpen(mockForm);

    const formEl = dom.getElement('testform1');
    /** @suppress {checkTypes} suppression added to enable type checking */
    const formData = forms.getFormDataMap(formEl);
    /**
     * @suppress {strictMissingProperties} suppression added to enable type
     * checking
     */
    const result =
        forms.submitFormDataInNewWindow(formEl.action, formEl.method, formData);
    assertTrue(result);
    HTMLFormElement.prototype.appendChild = appendChild;
    HTMLFormElement.prototype.submit = submit;
  }
@suppress {checkTypes}
                                                                      suppression
                                                                      added to
                                                                      enable
                                                                      type
                                                                      checking