<!doctype html>
<meta charset="utf-8">
<title>CSS Test: calc() function in webkit-gradient</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
    #test {
        background-image: -webkit-gradient(linear, left top, left bottom, from(#00abeb), to(#fff), color-stop(calc(40% + 10%), #fff));
    }
</style>
<div id="test"></div>
<script>
    const div = document.querySelector("#test");
    const expected = '-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(0, 171, 235)), to(rgb(255, 255, 255)), color-stop(0.5, rgb(255, 255, 255)))'
    test(function() {
        assert_equals(getComputedStyle(div).backgroundImage, expected);
    }, "calc() in webkit-gradient");
</script>