ladybird/Tests/LibWeb/Text/input/css/page-marks.html
Sam Atkins 3a235e9050 LibWeb/CSS: Parse @page bleed, marks, page-orientation descriptors
These don't have WPT tests so I've added some myself.
2025-05-15 09:53:29 +01:00

34 lines
868 B
HTML

<!DOCTYPE html>
<style>
@page {}
</style>
<script src="../include.js"></script>
<script>
test(() => {
let page = document.styleSheets[0].cssRules[0];
const testCases = [
"none",
"crop",
"cross",
"crop cross",
"cross crop",
// Invalid
"none crop",
"crop crop",
"cross cross",
"cross crop cross",
"orange",
"auto"
];
for (let testCase of testCases) {
page.style.removeProperty("marks");
page.style.marks = testCase;
let parsed = page.style.marks;
if (parsed.length)
println(`"marks: ${testCase}": parsed as "${parsed}"`);
else
println(`"marks: ${testCase}": INVALID`);
}
});
</script>