ame);
  await new Promise(requestAnimationFrame);
  await new Promise(requestAnimationFrame);
  assert_false(select1.matches(':open'),'changing appearance while the picker is open should close it');
}, 'Switching appearance in JS after picker is open should close the picker');
</script>

<button id=reset>Reset</button>
<select id=test2>
  <button><selectedcontent></selectedcontent></button>
  <option>option one</option>
  <option>option two</option>
  <option>option three</option>
</select>

<style>
  #test