blob: 565830990c94bbb587406073a535e1da79624bc6 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script src="parsing-test-utils.js"></script>
<script>
description('Test parsing of the CSS shape-image-threshold property.');
// The test functions and globals used here are defined parsing-test-utils.js.
applyToEachArglist(
testShapeComputedProperty,
[// [property, value, expectedValue]
["shape-image-threshold", "0", "0"],
["shape-image-threshold", "0.5", "0.5"],
["shape-image-threshold", "1", "1"],
["shape-image-threshold", "-0.1", "0"],
["shape-image-threshold", "1.1", "1"],
["shape-image-threshold", "identifier", "0"],
["shape-image-threshold", "\'string\'", "0"]
]
);
applyToEachArglist(
testNotInheritedShapeChildProperty,
[// [property, parentValue, childValue, expectedChildValue]
["shape-image-threshold", "0", "0", "0"],
["shape-image-threshold", "0", "1", "1"],
["shape-image-threshold", "1", "-1", "0"],
["shape-image-threshold", "2", "1", "1"]]
);
shouldBeTrue("CSS.supports('shape-image-threshold', '0.8')")
shouldBeTrue("CSS.supports('shape-image-threshold', '-0.5')")
shouldBeTrue("CSS.supports('shape-image-threshold', '-34')")
shouldBeFalse("CSS.supports('shape-image-threshold', '5px')")
</script>
</body>
</html>