<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// The triple click should select the entire line.
selection_test(
'<pre contenteditable id="target">this text is in whitespace:pre</pre>',
selection => {
if (!window.eventSender)
throw 'This test requires eventSender.';
const elem = selection.document.getElementById('target');
// x, y should be a position on the second line (after whitespace:pre).
const x = elem.offsetLeft + elem.offsetWidth - 30;
const y = elem.offsetTop + elem.offsetHeight / 2 + 10;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.mouseUp();
eventSender.mouseDown();
eventSender.mouseUp();
eventSender.mouseDown();
eventSender.mouseUp();
},
'<pre contenteditable id="target">^this text is in whitespace:pre|</pre>');
</script>