ladybird/Tests/LibWeb/Ref/input/ol-render-node-insert-existing-child-group.html
Manuel Zahariev 51b4b4a270 LibWeb: Tests for recalculating ordinals after list manipulation
FIXME: Rendering modifications to a list is sometimes not pixel-perfect
       vs. reference (likely a bug). After this is fixed, screenshot
       tests from this commit will likely fail + can be moved to
       ref tests.
2025-06-16 12:44:58 +01:00

46 lines
1.1 KiB
HTML

<!DOCTYPE html>
<head>
<link rel="match" href="../expected/ol-render-node-insert-existing-child-group-ref.html" />
</head>
<html class="reftest-wait">
<body>
<ol id="ol1">
<li>One</li>
<div id="div1">
<li>Three</li>
<li>Four</li>
</div>
<li>Two</li>
<li id="five">Five</li>
</ol>
<ol reversed id="ol2">
<li>Five</li>
<div id="div2">
<li>Three</li>
<li>Two</li>
</div>
<li>Four</li>
<li id="one">One</li>
</ol>
<script>
// Two nested requestAnimationFrame() calls to force code execution _after_ initial paint
requestAnimationFrame(() => {
requestAnimationFrame(() => {
const ol1 = document.getElementById("ol1");
const div1 = document.getElementById("div1");
const five = document.getElementById("five");
const ol2 = document.getElementById("ol2");
const div2 = document.getElementById("div2");
const one = document.getElementById("one");
ol1.insertBefore( div1, five );
ol2.insertBefore( div2, one );
document.documentElement.classList.remove("reftest-wait");
});
});
</script>
</body>
</html>