olve));
  assert_false(select1.matches(':open'),'There should be no oscillation or re-opening the picker (2)');
  await new Promise(resolve => requestAnimationFrame(resolve));
  assert_false(select1.matches(':open'),'There should be no oscillation or re-opening the picker (3)');
}, 'Switching appearance in popover-open should close the picker');

promise_test(async (t) => {
  const style = document.createElement('style');
  document.head.append(style);
  t.add_cleanup(() => style.remove());
  assert_equals(