xt("new", 0, "default".length);
    assert_equals(editor.value, "new value", "The value should be set properly by setRangeText");
  } finally {
    finalize(editor);
  }
}, `<${params.get("editor")}>.setRangeText("new", 0, "default".length) (with focus)`);

promise_test(async () => {
  const [hideTarget, editor] = init();
  try {
    editor.focus();
    editor.blur();
    hideTarget.style.display = "none";
    editor.setRangeText("new", 0, "default".length);
    assert_equals(editor.value, "new value", "The