ce(import_text);
  return sheet_promise.then((sheet) => {
    // replace() ignores @import rules:
    assert_equals(sheet.cssRules.length, 0);
    assert_equals(getComputedStyle(shadowDiv).color, "rgb(0, 0, 0)");
  }).catch((reason) => {
    assert_unreached(`Promise was rejected (${reason}) when it should have been resolved`);
  });
}, 'CSSStyleSheet.replace allows, but ignores, import rule inside');

promise_test(() => {
  const span = document.createElement("span");
  thirdSection.appendChild(span);
  co