<!DOCTYPE html>
<script src="../../../../resources/testharness.js"></script>
<script src="../../../../resources/testharnessreport.js"></script>
<script src="../../../../resources/gesture-util.js"></script>
<script src="../../../../resources/testdriver.js"></script>
<script src="../../../../resources/testdriver-actions.js"></script>
<script src="../../../..//resources/testdriver-vendor.js"></script>
<div><span id="dragme">Make Selection Here<span></div>
<div id="log"></div>
<script>
promise_test(async t => {
const target = document.getElementById('dragme');
preventContextMenu(t);
await touchLongPressElement(target, { duration: 1200 });
assert_equals(window.getSelection().toString(), 'Selection');
const pos = elementCenter(target);
await touchTap(pos.x, pos.y);
assert_true(window.getSelection().isCollapsed);
}, 'Selection is reset after tap gesture.');
</script>