t(5, document.documentElement.clientHeight * 2), null);
  }, "document.caretPositionFromPoint() should return null if given coordinates outside of the viewport");

  test(() => {
    container.setHTMLUnsafe(`<div id="textDiv">aaa</div>`);
    const textDiv = document.getElementById("textDiv");
    const rect = textDiv.getBoundingClientRect();
    const characterWidth = rect.width / textDiv.textContent.length;
    const characterIndex = 2
    const x = rect.left + characterWidth * characterIndex;
    const y