blob: 041e2894444581394c16ce53fea513af20beab46 [file] [log] [blame]
<!DOCTYPE html>
<title>Parsing/serializing 'mask-source-type'</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
* { font-size: 16px; }
div { font-size: 8px; }
</style>
<body>
<script>
function computedValue(value) {
var div = document.createElement('div');
document.body.appendChild(div);
div.style.setProperty("-webkit-mask-image", "none, none, none, none");
div.style.setProperty("mask-source-type", value);
var computedValue = getComputedStyle(div).getPropertyValue("mask-source-type");
document.body.removeChild(div);
return computedValue;
}
function makeTest(value, expected) {
test(function() {
assert_equals(computedValue(value), expected);
}, document.title + ', ' + value);
}
makeTest("alpha, alpha, alpha, alpha", "alpha, alpha, alpha, alpha");
makeTest("luminance, alpha", "luminance, alpha, alpha, alpha");
makeTest("luminance, luminance, luminance, luminance",
"luminance, luminance, luminance, luminance");
makeTest("auto, alpha, luminance, luminance",
"alpha, alpha, luminance, luminance");
</script>
</body>