est::before, #test::after { content:"X"; }
</style>
<div class="wrapper">
  <fieldset id=test><legend>A</legend>Y</fieldset>
  <fieldset id=ref><legend>A</legend>XYX</fieldset>
</div>
<script>
test(() => {
  const testElm = document.querySelector('#test');
  const refElm = document.querySelector('#ref');
  assert_equals(testElm.clientWidth, refElm.clientWidth, 'clientWidth');
  assert_equals(testElm.clientHeight, refElm.clientHeight, 'clientHeight');
});
</script>
