blob: 6ba4f8652d7c4bb59c73d23fa503d65d3e41339c [file] [log] [blame]
<html>
<head>
<style>
body {
counter-reset: section;
}
h1 {
counter-increment: section;
}
h2:before {
content: counter(section);
}
h2:after {
content: counters(section, ":", decimal);
}
h3:before {
content: counter(section, lower-roman);
}
h3:after {
content: counters(section, ",", upper-roman);
}
h4:before {
content: counter(section, none);
}
</style>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Test the cssText output of counter-valued CSSPrimitiveValues");
var rules = document.styleSheets[0].cssRules;
shouldBeEqualToString("rules[2].style.cssText", `content: counter(section, decimal);`);
shouldBeEqualToString("rules[3].style.cssText", `content: counters(section, ":", decimal);`);
shouldBeEqualToString("rules[4].style.cssText", `content: counter(section, lower-roman);`);
shouldBeEqualToString("rules[5].style.cssText", `content: counters(section, ",", upper-roman);`);
shouldBeEqualToString("rules[6].style.cssText", `content: counter(section, none);`);
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>