 'type=button should toggle the popover');
}, 'Button type=button with form attr should toggle popover');

test((t) => {
  let formSubmit = false;
  function onSubmit(e) {
    e.preventDefault();
    formSubmit = true;
  }
  form.addEventListener('submit', onSubmit);
  t.add_cleanup(() => {
    mypopover.hidePopover();
    form.removeEventListener('submit', onSubmit);
  });
  document.getElementById('invalid-attr-form').click();
  assert_true(formSubmit, 'type=invalid should trigger form submit event');
  a