blob: 90cfb811fb61d01aa8e500ff6089a8006a5f300c [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(() => {
let span = document.createElement('span');
document.body.appendChild(span);
let selectionInShadow = span.attachShadow({mode: 'open'}).getSelection();
getSelection().addRange(document.caretRangeFromPoint());
assert_equals(selectionInShadow.rangeCount, 0);
}, 'rangeCount in ShadowRoot should be 0 if the selection can\'t be represented in the ShadowRoot.');
</script>
</body>