LibWeb: Unit test for Anchor element covered by pseudo-element

This commit is contained in:
AmusedNetwork 2025-06-07 14:07:42 +01:00 committed by Sam Atkins
commit 7c85e57c32
Notes: github-actions[bot] 2025-06-09 15:21:53 +00:00
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<script src="include.js"></script>
<style>
body {
width: 100px;
height: 100px;
}
.link::after {
content: "";
position: absolute;
left: 0;
right: 0;
height: 100%;
}
</style>
<body>
<a class="link" href="#" onclick="this.textContent = 'PASS'">FAIL</a>
</body>
<script>
test(() => {
internals.click(50, 60);
let linkText = document.querySelector(".link").textContent;
println(linkText);
});
</script>