election that crosses shadow boundaries');

test(() => {
    container.innerHTML = 'a<div id="host"></div>b';
    const shadowRoot = host.attachShadow({mode: 'closed'});
    shadowRoot.innerHTML = 'hello, world';
    getSelection().setBaseAndExtent(shadowRoot.firstChild, 7, container, 1);
    assert_equals(getSelection().direction, 'backward');
}, 'direction returns "backward" when there is a forward selection that crosses shadow boundaries');

</script>
</body>
</html>
