blob: 7d3464003b72e765efe6b0a124edacd9e756bc37 [file] [log] [blame]
<script src="../../resources/js-test-pre.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<style>
#test {
}
</style>
<body>
</body>
<p>
Test that e matched declaration cache handles explicitly inherited properties correctly.
<p>
<script>
var shorthandNames = [
"background",
"background-position",
"background-repeat",
"border",
"border-bottom",
"border-color",
// getPropertyValue() functionality not supported, see http://webkit.org/b/103245.
// "border-image",
"border-left",
"border-radius",
"border-right",
"border-spacing",
"border-style",
"border-top",
"border-width",
"list-style",
"font",
"margin",
"outline",
"overflow",
"padding",
"webkit-animation",
"webkit-border-after",
"webkit-border-before",
"webkit-border-end",
"webkit-border-start",
"webkit-columns",
"webkit-column-rule",
"flex-flow",
"flex",
"webkit-mask",
"webkit-mask-position",
"webkit-mask-repeat",
"webkit-text-emphasis",
"webkit-text-stroke",
"webkit-transition",
"webkit-transform-origin"
];
var style = document.styleSheets[0].rules[0].style;
function test(shorthand) {
var result = [];
style[shorthand] = "inherit";
result.push(style[shorthand]);
style[shorthand] = "initial";
result.push(style[shorthand]);
return result.join(", ");
}
for (var i = 0; i < shorthandNames.length; ++i) {
shouldBeEqualToString("test('" + shorthandNames[i] + "')", "inherit, initial");
}
</script>