LibWeb/CSS: Unit tests for changes to counter definitions

This commit is contained in:
Manuel Zahariev
2025-06-02 09:25:55 -07:00
committed by Alexander Kalenik
parent 99c6eb0c35
commit f972342c27
Notes: github-actions[bot] 2025-06-03 01:52:47 +00:00
24 changed files with 447 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="../../../expected/css/css-counter/counter-increment-insert-before-ref.html" />
<style>
div > div::before { content: counter(item) ': '; }
.Inc1 { counter-increment: item 1; }
</style>
<div id='parent'>
<div id='two' class='Inc1'>Two</div>
<div class='Inc1'>Three</div>
</div>
<script>
// Two nested requestAnimationFrame() calls to force code execution _after_ initial paint
requestAnimationFrame(() => {
requestAnimationFrame(() => {
const parent = document.getElementById('parent');
const two = document.getElementById('two');
const one = document.createElement('div');
one.innerHTML = 'One';
one.classList.add('Inc1');
parent.insertBefore( one, two );
document.documentElement.classList.remove("reftest-wait");
});
});
</script>
</html>