Tests: Unskip selection-over-multiple-code-units.html test

The flake was reproducible by running the entire LibWeb test suite over
and over again with sanitizers enabled. By making the test async and run
at window `load` time instead of document `DOMContentLoaded` time, I've
not been able to reproduce the issue locally.

Ideally I was able to find the underlying cause for this bug, but for
now I'd rather run this regression test.
This commit is contained in:
Jelle Raaijmakers 2025-07-02 13:07:57 +02:00 committed by Sam Atkins
commit 1eb581815a
Notes: github-actions[bot] 2025-07-03 09:28:58 +00:00
2 changed files with 11 additions and 13 deletions

View file

@ -2,16 +2,18 @@
<script src="include.js"></script>
😭foobar😭
<script>
test(() => {
document.body.offsetWidth; // force layout
asyncTest(done => {
window.addEventListener('load', () => {
internals.mouseDown(55, 20);
internals.movePointerTo(110, 20);
internals.mouseDown(55, 20);
internals.movePointerTo(110, 20);
const activeRange = window.getSelection().getRangeAt(0);
printElement(activeRange.startContainer);
println(activeRange.startOffset);
printElement(activeRange.endContainer);
println(activeRange.endOffset);
const activeRange = window.getSelection().getRangeAt(0);
printElement(activeRange.startContainer);
println(activeRange.startOffset);
printElement(activeRange.endContainer);
println(activeRange.endOffset);
done();
});
});
</script>