mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb/CSS: Unit tests for changes to counter definitions
This commit is contained in:
committed by
Alexander Kalenik
parent
99c6eb0c35
commit
f972342c27
Notes:
github-actions[bot]
2025-06-03 01:52:47 +00:00
Author: https://github.com/manuel-za Commit: https://github.com/LadybirdBrowser/ladybird/commit/f972342c27d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4890 Reviewed-by: https://github.com/kalenikaliaksandr
@@ -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>
|
||||
Reference in New Issue
Block a user