;
  thirdSection.appendChild(span);
  const shadowDiv = attachShadowDiv(span);
  const sheet = new CSSStyleSheet();
  sheet.replaceSync("* { color: red; }");
  span.shadowRoot.adoptedStyleSheets = [sheet];
  assert_equals(getComputedStyle(shadowDiv).color, "rgb(255, 0, 0)");

  document.adoptNode(span);
  assert_equals(span.shadowRoot.adoptedStyleSheets.length, 1);
  assert_equals(span.shadowRoot.adoptedStyleSheets[0], sheet);

  const iframe = document.createElement("iframe");
  document.body.appendChild(i