mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 16:09:23 +00:00
22 lines
658 B
HTML
22 lines
658 B
HTML
<!DOCTYPE html>
|
|
<script src="include.js"></script>
|
|
<p id="a">Uno</p>
|
|
|
|
<script>
|
|
test(() => {
|
|
var selection = window.getSelection();
|
|
selection.setBaseAndExtent(a.firstChild, 3, a.firstChild, 3);
|
|
selection.extend(a.firstChild, 0);
|
|
if (selection.anchorNode !== a.firstChild
|
|
|| selection.anchorOffset !== 3) {
|
|
println('FAIL: anchor has moved');
|
|
return;
|
|
}
|
|
if (selection.focusNode !== a.firstChild
|
|
|| selection.focusOffset !== 0) {
|
|
println('FAIL: focus is not where we expected');
|
|
return;
|
|
}
|
|
println('PASS');
|
|
})
|
|
</script>
|