<!DOCTYPE html>
<script src="../../../../resources/testharness.js"></script>
<script src="../../../../resources/testharnessreport.js"></script>
<div id="sample"><table id="one"><caption></caption></table></div>
<div id="log"></div>
<script>
var one = document.querySelector('#one');
document.addEventListener('selectstart', function() {
    one.remove();
});
test(function() {
    if (!window.eventSender)
        return;
    eventSender.mouseMoveTo(one.offsetLeft, one.offsetTop);
    eventSender.mouseDown();
    var selection = getSelection();
    assert_equals(selection.rangeCount, 0);
});
</script>
