SSStyleSheet();
  document.adoptedStyleSheets = [sheet];
  assert_equals(getComputedStyle(span).color, "rgb(0, 0, 0)");

  // Replace the stylesheet text that will color it red.
  sheet.replaceSync(".target { color: red; }");
  assert_equals(getComputedStyle(span).color, "rgb(255, 0, 0)");

  // Create a style element that will set colors to white.
  const style = document.createElement("style");
  style.textContent = ".target { color: white; }";
  span.appendChild(style)
  assert_equals(getComputedStyle(sp