
  } catch(reason) {
    assert_unreached(`replaceSync threw an exception (${reason}) when it shouldn't have`);
  }
}, 'CSSStyleSheet.replaceSync allows, but ignores, import rule inside');

promise_test(() => {
  const sheet = new CSSStyleSheet();
  const sheet_promise = sheet.replace("@import url('not-there.css');");

  return sheet_promise.then((sheet) => {
    // No exception here
  }).catch((reason) => {
    assert_unreached("Promise was rejected");
  });
}, 'CSSStyleSheet.replace does not reject on fai