* { font-size: 16px; }
div { font-size: 8px; }
</style>
-<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script src="parsing-test-utils.js"></script>
function testInvalidValue(property, value) {
testStyleValue(value, null);
- testComputedStyleValue(value, 'outside-shape');
+ testComputedStyleValue(value, 'none');
}
// absolute lengths - number serialization, units
testStyleValue("rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)", "rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)");
testStyleValue("inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)", "inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)");
+testStyleValue("inset(1cm 1mm 1in 1px round 1pt 1pc)", "inset(1cm 1mm 1in 1px round 1pt 1pc 1pt 1pc / 1pt 1pc 1pt 1pc)");
+testStyleValue("inset(-1cm 1mm 1in 1px round 1pt 1pc)", "inset(-1cm 1mm 1in 1px round 1pt 1pc 1pt 1pc / 1pt 1pc 1pt 1pc)");
+testStyleValue("inset(-1cm 1mm -1in 1px round 1pt 1pc)", "inset(-1cm 1mm -1in 1px round 1pt 1pc 1pt 1pc / 1pt 1pc 1pt 1pc)");
// font-relative lengths - number serialization, units, resolution
testStyleValue("circle(-1em, +1em, 1em)", "circle(-1em, 1em, 1em)");
testStyleValue("circle(1vh, 1vh, 1vh)", "circle(1vh, 1vh, 1vh)");
testStyleValue("circle(1vmin, 1vmin, 1vmin)", "circle(1vmin, 1vmin, 1vmin)");
-testComputedStyleValue("circle(.5vw, 1vw, 1.5vw)", "circle(0.5vw, 1vw, 1.5vw)");
-testComputedStyleValue("circle(.5vh, 1vh, 1.5vh)", "circle(0.5vh, 1vh, 1.5vh)");
-testComputedStyleValue("circle(.5vmin, 1vmin, 1.5vmin)", "circle(0.5vmin, 1vmin, 1.5vmin)");
+testComputedStyleValue("circle(.5vw, 1vw, 1.5vw)", "circle(4px, 8px, 12px)");
+testComputedStyleValue("circle(.5vh, 1vh, 1.5vh)", "circle(3px, 6px, 9px)");
+testComputedStyleValue("circle(.5vmin, 1vmin, 1.5vmin)", "circle(3px, 6px, 9px)");
// percentage lengths - units
testStyleValue("circle(100%, 100%, 100%)", "circle(100%, 100%, 100%)");
testStyleValue("rectangle(45%, 45%, 90%, 60%, 25%, 10%)", "rectangle(45%, 45%, 90%, 60%, 25%, 10%)");
testStyleValue("inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)", "inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)");
+testStyleValue("inset(45% 45% 90% 60% round 25% 10%)", "inset(45% 45% 90% 60% round 25% 10% 25% 10% / 25% 10% 25% 10%)");
testStyleValue("ellipse(100%, 100%, 100%, 100%)", "ellipse(100%, 100%, 100%, 100%)");
testStyleValue("polygon(10% 20%, 30% 40%, 40% 50%)", "polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)");
testComputedStyleValue("circle(50%, 100%, 150%)", "circle(50%, 100%, 150%)");
testComputedStyleValue("rectangle(45%, 45%, 90%, 60%, 25%, 10%)", "rectangle(45%, 45%, 90%, 60%, 25%, 10%)");
testComputedStyleValue("inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)", "inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)");
+testComputedStyleValue("inset(45% 45% 90% 60% round 25% 10%)", "inset(45% 45% 90% 60% round 25% 10% 25% 10% / 25% 10% 25% 10%)");
testComputedStyleValue("ellipse(100%, 100%, 100%, 100%)", "ellipse(100%, 100%, 100%, 100%)");
testComputedStyleValue("polygon(10% 20%, 30% 40%, 40% 50%)", "polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)");
testInvalidValue("shape-inside", "rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)");
testInvalidValue("shape-inside", "inset-rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)");
testInvalidValue("shape-inside", "inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)");
+testInvalidValue("shape-inside", "inset(1cm 1mm 1in 1px round 1pt -1pc)");
testInvalidValue("shape-inside", "ellipse(1em, 1em, -1em, 1em)");
testInvalidValue("shape-inside", "ellipse(1em, 1em, 1em, -1em)");