mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-23 08:30:50 +00:00
30 lines
836 B
HTML
30 lines
836 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
@page {}
|
|
</style>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
let page = document.styleSheets[0].cssRules[0];
|
|
const testCases = [
|
|
"upright",
|
|
"rotate-left",
|
|
"rotate-right",
|
|
// Invalid
|
|
"auto",
|
|
"none",
|
|
"rotate-left rotate-right",
|
|
"90deg"
|
|
];
|
|
|
|
for (let testCase of testCases) {
|
|
page.style.removeProperty("page-orientation");
|
|
page.style.pageOrientation = testCase;
|
|
let parsed = page.style.pageOrientation;
|
|
if (parsed.length)
|
|
println(`"page-orientation: ${testCase}": parsed as "${parsed}"`);
|
|
else
|
|
println(`"page-orientation: ${testCase}": INVALID`);
|
|
}
|
|
});
|
|
</script>
|