blob: a5155292ff0e00f38badb711eeb8ece4896e7c2b [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('Testing parsing of the -webkit-shape-outside property.');
// The test functions and globals used here are defined parsing-test-utils.js.
validShapeValues.forEach(function(elt, i, a) {
var value = (elt instanceof Array) ? elt[0] : elt;
var expectedValue = (elt instanceof Array) ? elt[1] : elt;
var computedValue = (elt instanceof Array && elt.length > 2) ? elt[2] : expectedValue;
testShapeSpecifiedProperty("-webkit-shape-outside", value, expectedValue);
testShapeComputedProperty("-webkit-shape-outside", value, computedValue);
});
testLocalURLShapeProperty("-webkit-shape-outside", "url(\'image\')", 'url("image")');
invalidShapeValues.forEach(function(value, i, a) {
testShapePropertyParsingFailure("-webkit-shape-outside", value, "none")
});
applyToEachArglist(
testNotInheritedShapeProperty,
[// [property, parentValue, childValue, expectedValue]
["-webkit-shape-outside", "none", "circle(30px at 10px 20px)", "parent: none, child: circle(30px at 10px 20px)"],
["-webkit-shape-outside", "circle(30px at 10px 20px)", "initial", "parent: circle(30px at 10px 20px), child: none"],
["-webkit-shape-outside", "circle(30px at 10px 20px)", "", "parent: circle(30px at 10px 20px), child: none"],
["-webkit-shape-outside", "circle(30px at 10px 20px)", "inherit", "parent: circle(30px at 10px 20px), child: circle(30px at 10px 20px)"],
["-webkit-shape-outside", "", "inherit", "parent: none, child: none"],
["-webkit-shape-outside", "none", "inherit", "parent: none, child: none"]]
);
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>