blob: d5dbbfd0dd837d27543f8d4cfab882892593c8bc [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.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(
testShapeSpecifiedProperty,
[// [property, value, expectedValue]
["-webkit-shape-image-threshold", "0", "0"],
["-webkit-shape-image-threshold", "0.5", "0.5"],
["-webkit-shape-image-threshold", "1", "1"],
["-webkit-shape-image-threshold", "-0.1", "-0.1"],
["-webkit-shape-image-threshold", "1.1", "1.1"],
["-webkit-shape-image-threshold", "identifier", ""],
["-webkit-shape-image-threshold", "\'string\'", ""],
["-webkit-shape-image-threshold", "calc(0.1 + 0.4)", "calc(0.5)"]
]
);
applyToEachArglist(
testShapeComputedProperty,
[// [property, value, expectedValue]
["-webkit-shape-image-threshold", "0", "0"],
["-webkit-shape-image-threshold", "0.5", "0.5"],
["-webkit-shape-image-threshold", "1", "1"],
["-webkit-shape-image-threshold", "-0.1", "0"],
["-webkit-shape-image-threshold", "1.1", "1"],
["-webkit-shape-image-threshold", "identifier", "0"],
["-webkit-shape-image-threshold", "\'string\'", "0"],
["-webkit-shape-image-threshold", "calc(0.1 + 0.4)", "0.5"]
]
);
applyToEachArglist(
testNotInheritedShapeChildProperty,
[// [property, parentValue, childValue, expectedChildValue]
["-webkit-shape-image-threshold", "0", "0", "0"],
["-webkit-shape-image-threshold", "0", "1", "1"],
["-webkit-shape-image-threshold", "1", "-1", "0"],
["-webkit-shape-image-threshold", "2", "1", "1"]]
);
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>