chromium/third_party/blink/web_tests/fast/dom/Document/CaretRangeFromPoint/hittest-empty-line.html

<!DOCTYPE html>
<script src="../../../../resources/testharness.js"></script>
<script src="../../../../resources/testharnessreport.js"></script>
<pre style="font: 10px/10px Ahem">foo&NewLine;&NewLine;bar</pre>
<script>
test(() => {
const pre = document.querySelector('pre');
const text = pre.firstChild;
const x = pre.offsetLeft + 15;
const y = pre.offsetTop + 15;

const result = document.caretRangeFromPoint(x, y);
assert_true(result instanceof Range);
assert_equals(result.startContainer, text);
assert_equals(result.startOffset, 4); // "foo&NewLine;|&NewLine;bar"
assert_true(result.collapsed);
},
'Hit test the empty line in <pre>');
</script>