chromium/third_party/blink/web_tests/external/wpt/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-dynamic-update.html

<!DOCTYPE html>
<html class=reftest-wait>
<title>legend and dynamic update</title>
<link rel=fieldset-foo-ref.html>
<p>There should be a normal fieldset below with the legend "Foo".</p>
<fieldset>
  <legend>F</legend>
</fieldset>
<script>
  const legend = document.querySelector('legend');
  // force layout
  legend.offsetTop;
  requestAnimationFrame(() => {
    legend.textContent += "oo";
    requestAnimationFrame(() => {
      document.documentElement.removeAttribute('class');
    });
  });
</script>