<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(() => {
document.head.textContent = "Wow";
var s = getSelection();
s.collapse(document.documentElement);
s.addRange(s.getRangeAt(0).cloneRange());
}, "addRange() to a Selection with invisible selection should not crash.");
</script>