<!DOCTYPE html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<div id="testDiv" style="position: absolute;"></div>
<script>
description("Tests assigning a calculated value to '-webkit-filter' CSS property.");

var testDiv = document.getElementById("testDiv");

shouldBeEmptyString("testDiv.style['-webkit-filter']");
evalAndLog("testDiv.style['-webkit-filter'] = 'saturate(calc(10% * 2))'");
shouldBeEqualToString("testDiv.style['-webkit-filter']", "saturate(calc(20%))");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "saturate(0.2)");

evalAndLog("testDiv.style['-webkit-filter'] = 'brightness(calc(10% * 2))'");
shouldBeEqualToString("testDiv.style['-webkit-filter']", "brightness(calc(20%))");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "brightness(0.2)");

</script>
<script src="../../resources/js-test-post.js"></script>
</body>
