chromium/third_party/blink/web_tests/editing/selection/selection_extend_in_detached_window.html

<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<iframe></iframe>
<script>
window.onload = () => {
  test(() => {
    let iframe = document.querySelector('iframe');
    let selection = iframe.contentWindow.getSelection();
    iframe.remove();
    selection.extend(document.body);
  }, 'Selection.extend() in a detached Window should not crash');
};
</script>